<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 03:26:35 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>Whamcloud Community JIRA</title>
    <link>https://jira.whamcloud.com</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.4.14</version>
        <build-number>940014</build-number>
        <build-date>05-12-2023</build-date>
    </build-info>


<item>
            <title>[LU-16387] reduce negative effect from failed mem allocations in OBD_ALLOC_LARGE</title>
                <link>https://jira.whamcloud.com/browse/LU-16387</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;OBD_ALLOC_LARGE has a switch to vmalloc, if kmalloc allocation fails. Really the vm tries to kmalloc memory so hard that the system spends significant amount of time in try_to_free_pages() allocation loops instead of failing back to vmalloc().&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
#define OBD_ALLOC_LARGE(ptr, size)                                            \
&lt;span class=&quot;code-keyword&quot;&gt;do&lt;/span&gt; {                                                                          \
        &lt;span class=&quot;code-comment&quot;&gt;/* LU-8196 - force large allocations to use vmalloc, not kmalloc */&lt;/span&gt;   \
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ((size) &amp;gt; KMALLOC_MAX_SIZE)                                          \
                ptr = NULL;                                                   \
        &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt;                                                                  \
                OBD_ALLOC_GFP(ptr, size, GFP_NOFS | __GFP_NOWARN);            \
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (ptr == NULL)                                                      \
                OBD_VMALLOC(ptr, size);                                       \
} &lt;span class=&quot;code-keyword&quot;&gt;while&lt;/span&gt; (0)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;in-kernel (linux-4.18) implementation of kvmalloc() is more smart:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
        /*
         * We want to attempt a large physically contiguous block first because
         * it is less likely to fragment multiple larger blocks and therefore
         * contribute to a &lt;span class=&quot;code-object&quot;&gt;long&lt;/span&gt; term fragmentation less than vmalloc fallback.
         * However make sure that larger requests are not too disruptive - no
         * OOM killer and no allocation failure warnings as we have a fallback.
         */
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (size &amp;gt; PAGE_SIZE) {
                kmalloc_flags |= __GFP_NOWARN;

                &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (!(kmalloc_flags &amp;amp; __GFP_RETRY_MAYFAIL))
                        kmalloc_flags |= __GFP_NORETRY;
        }

        ret = kmalloc_node(size, kmalloc_flags, node);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;__GFP_NORETRY can be used in OBD_ALLOC_LARGE() the same way for the same purposes.&lt;/p&gt;

&lt;p&gt;Here is an example of failed mem allocations on a heavy loaded system (CAST-31591)&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;2022-11-17 17:32:44 [974463.901303] Pid: 31862, comm: ll_ost_io00_744 3.10.0-957.1.3957.1.3.x3.5.46.x86_64 #1 SMP Thu Jan 20 13:08:08 CST 2022
2022-11-17 17:32:44 [974463.913928] Call Trace:
2022-11-17 17:32:44 [974463.918313] [&amp;lt;0&amp;gt;] __cond_resched+0x26/0x30
2022-11-17 17:32:44 [974463.924347] [&amp;lt;0&amp;gt;] shrink_page_list+0x97/0xc30
2022-11-17 17:32:44 [974463.930623] [&amp;lt;0&amp;gt;] shrink_inactive_list+0x1c6/0x5d0
2022-11-17 17:32:44 [974463.937296] [&amp;lt;0&amp;gt;] shrink_lruvec+0x385/0x730
2022-11-17 17:32:44 [974463.943307] [&amp;lt;0&amp;gt;] shrink_zone+0x76/0x1a0
2022-11-17 17:32:44 [974463.949020] [&amp;lt;0&amp;gt;] do_try_to_free_pages+0xf0/0x4e0
2022-11-17 17:32:44 [974463.955486] [&amp;lt;0&amp;gt;] try_to_free_pages+0xfc/0x180
2022-11-17 17:32:44 [974463.961645] [&amp;lt;0&amp;gt;] __alloc_pages_slowpath+0x457/0x724
2022-11-17 17:32:44 [974463.968328] [&amp;lt;0&amp;gt;] __alloc_pages_nodemask+0x405/0x420
2022-11-17 17:32:44 [974463.974996] [&amp;lt;0&amp;gt;] alloc_pages_current+0x98/0x110
2022-11-17 17:32:44 [974463.981328] [&amp;lt;0&amp;gt;] __get_free_pages+0xe/0x40
2022-11-17 17:32:44 [974463.987227] [&amp;lt;0&amp;gt;] kmalloc_order_trace+0x2e/0xa0
2022-11-17 17:32:44 [974463.993478] [&amp;lt;0&amp;gt;] __kmalloc+0x211/0x230
2022-11-17 17:32:44 [974463.999085] [&amp;lt;0&amp;gt;] ptlrpc_new_bulk+0x13a/0x870 [ptlrpc] &lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
        <key id="73590">LU-16387</key>
            <summary>reduce negative effect from failed mem allocations in OBD_ALLOC_LARGE</summary>
                <type id="1" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="4" iconUrl="https://jira.whamcloud.com/images/icons/priorities/minor.svg">Minor</priority>
                        <status id="5" iconUrl="https://jira.whamcloud.com/images/icons/statuses/resolved.png" description="A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.">Resolved</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="1">Fixed</resolution>
                                        <assignee username="zam">Alexander Zarochentsev</assignee>
                                    <reporter username="zam">Alexander Zarochentsev</reporter>
                        <labels>
                    </labels>
                <created>Mon, 12 Dec 2022 16:20:59 +0000</created>
                <updated>Sat, 7 Jan 2023 15:16:31 +0000</updated>
                            <resolved>Sat, 7 Jan 2023 15:16:31 +0000</resolved>
                                                    <fixVersion>Lustre 2.16.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                            <comments>
                            <comment id="356065" author="gerrit" created="Mon, 12 Dec 2022 16:22:33 +0000"  >&lt;p&gt;&quot;Alexander Zarochentsev &amp;lt;alexander.zarochentsev@hpe.com&amp;gt;&quot; uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/c/fs/lustre-release/+/49380&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/fs/lustre-release/+/49380&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-16387&quot; title=&quot;reduce negative effect from failed mem allocations in OBD_ALLOC_LARGE&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-16387&quot;&gt;&lt;del&gt;LU-16387&lt;/del&gt;&lt;/a&gt; lustre: switch OBD_ALLOC_LARGE to vmalloc faster&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 566a9aa05042971e20854106e6830a5062d7e583&lt;/p&gt;</comment>
                            <comment id="358217" author="gerrit" created="Sat, 7 Jan 2023 07:57:31 +0000"  >&lt;p&gt;&quot;Oleg Drokin &amp;lt;green@whamcloud.com&amp;gt;&quot; merged in patch &lt;a href=&quot;https://review.whamcloud.com/c/fs/lustre-release/+/49380/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/fs/lustre-release/+/49380/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-16387&quot; title=&quot;reduce negative effect from failed mem allocations in OBD_ALLOC_LARGE&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-16387&quot;&gt;&lt;del&gt;LU-16387&lt;/del&gt;&lt;/a&gt; lustre: switch OBD_ALLOC_LARGE to vmalloc faster&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 41bed753b3830543740d0f099695adde50f4c20e&lt;/p&gt;</comment>
                            <comment id="358236" author="pjones" created="Sat, 7 Jan 2023 15:16:31 +0000"  >&lt;p&gt;Landed for 2.16&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                            <customfield id="customfield_10890" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10390" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i037q7:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10090" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10060" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Severity</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10022"><![CDATA[3]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        </customfields>
    </item>
</channel>
</rss>