<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:03:44 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-6842] Seeking the option to hook cl_page LRU up to kernel cache shrinker </title>
                <link>https://jira.whamcloud.com/browse/LU-6842</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;The purpose is that the client can cache max_cached_mb at maximum on the client side but if the memory is in pressure it should consume less by hooking it up to cache shrinker.&lt;/p&gt;
</description>
                <environment></environment>
        <key id="31065">LU-6842</key>
            <summary>Seeking the option to hook cl_page LRU up to kernel cache shrinker </summary>
                <type id="4" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11310&amp;avatarType=issuetype">Improvement</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="bobijam">Zhenyu Xu</assignee>
                                    <reporter username="jay">Jinshan Xiong</reporter>
                        <labels>
                            <label>llnl</label>
                    </labels>
                <created>Mon, 13 Jul 2015 17:23:12 +0000</created>
                <updated>Tue, 8 Oct 2019 08:04:22 +0000</updated>
                            <resolved>Fri, 9 Oct 2015 20:39:43 +0000</resolved>
                                                    <fixVersion>Lustre 2.8.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>9</watches>
                                                                            <comments>
                            <comment id="121261" author="pjones" created="Tue, 14 Jul 2015 17:39:44 +0000"  >&lt;p&gt;Bobijam&lt;/p&gt;

&lt;p&gt;Could you please investigate what is possible here?&lt;/p&gt;

&lt;p&gt;Peter&lt;/p&gt;</comment>
                            <comment id="121415" author="bobijam" created="Thu, 16 Jul 2015 04:35:18 +0000"  >&lt;p&gt;So this shrinker just reduce the ccc_lru_max, and of course shrink LRU if ccc_lru_left is not enough. I&apos;m wondering when the ccc_lru_max should be restored gradually when the memory is not under such pressure?&lt;/p&gt;</comment>
                            <comment id="121517" author="gerrit" created="Fri, 17 Jul 2015 07:10:53 +0000"  >&lt;p&gt;Bobi Jam (bobijam@hotmail.com) uploaded a new patch: &lt;a href=&quot;http://review.whamcloud.com/15630&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/15630&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-6842&quot; title=&quot;Seeking the option to hook cl_page LRU up to kernel cache shrinker &quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-6842&quot;&gt;&lt;del&gt;LU-6842&lt;/del&gt;&lt;/a&gt; clio: limit max cl_page LRU thru shrinker&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: a7cf7b259c93d0f30f390b142878f137d7791ba4&lt;/p&gt;</comment>
                            <comment id="121568" author="jay" created="Fri, 17 Jul 2015 18:05:13 +0000"  >&lt;blockquote&gt;
&lt;p&gt;So this shrinker just reduce the ccc_lru_max, and of course shrink LRU if ccc_lru_left is not enough. I&apos;m wondering when the ccc_lru_max should be restored gradually when the memory is not under such pressure?&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Sorry for delay response.&lt;/p&gt;

&lt;p&gt;This is not about reducing ccc_lru_max, which we don&apos;t need to adjust in this case. Actually the meaning of ccc_lru_max should be &apos;to cache this many pages if memory is enough&apos;. When the system memory is under pressure, Lustre shouldn&apos;t cache that much memory at all.&lt;/p&gt;

&lt;p&gt;We should register a cache shrinker on the OSC layer to get rid of some pages under memory pressure. Please take a look at osc_lru_reclaim(), but instead we are going to iterate each individual client_obd and destroy pages from them by the policies of last use, # of pages cached, etc.&lt;/p&gt;</comment>
                            <comment id="121895" author="bobijam" created="Wed, 22 Jul 2015 02:28:45 +0000"  >&lt;p&gt;patch updated.&lt;/p&gt;</comment>
                            <comment id="124621" author="cliffw" created="Wed, 19 Aug 2015 17:34:44 +0000"  >&lt;p&gt;Test results from Hyperion&lt;/p&gt;</comment>
                            <comment id="124641" author="paf" created="Wed, 19 Aug 2015 19:30:03 +0000"  >&lt;p&gt;Cliff - Can you explain the tests results a bit more?  What&apos;s memhog, for example?  Is all the testing with the patch installed?  If so, are there non-patched results somewhere to compare to?&lt;/p&gt;</comment>
                            <comment id="124677" author="jay" created="Thu, 20 Aug 2015 05:00:59 +0000"  >&lt;p&gt;memhog is a test program under $LUSTRE/lustre/test. It just allocates a huge amount of memory so that we can investigate if Lustre does well under memory pressure.&lt;/p&gt;</comment>
                            <comment id="124692" author="cliffw" created="Thu, 20 Aug 2015 15:17:41 +0000"  >&lt;p&gt;Added 2.7.56 results for comparison&lt;/p&gt;</comment>
                            <comment id="130001" author="gerrit" created="Fri, 9 Oct 2015 20:36:47 +0000"  >&lt;p&gt;Oleg Drokin (oleg.drokin@intel.com) merged in patch &lt;a href=&quot;http://review.whamcloud.com/15630/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/15630/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-6842&quot; title=&quot;Seeking the option to hook cl_page LRU up to kernel cache shrinker &quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-6842&quot;&gt;&lt;del&gt;LU-6842&lt;/del&gt;&lt;/a&gt; clio: add cl_page LRU shrinker&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 888a3141e72a25bef8daf822325b4295e5a0d5e8&lt;/p&gt;</comment>
                            <comment id="130003" author="pjones" created="Fri, 9 Oct 2015 20:39:43 +0000"  >&lt;p&gt;Landed for 2.8&lt;/p&gt;</comment>
                            <comment id="256044" author="panda" created="Tue, 8 Oct 2019 08:01:40 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.whamcloud.com/secure/ViewProfile.jspa?name=bobijam&quot; class=&quot;user-hover&quot; rel=&quot;bobijam&quot;&gt;bobijam&lt;/a&gt;,&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;
+#ifndef HAVE_SHRINKER_COUNT
+&lt;span class=&quot;code-keyword&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; osc_cache_shrink(SHRINKER_ARGS(sc, nr_to_scan, gfp_mask))
+{
+       struct shrink_control scv = {
+               .nr_to_scan = shrink_param(sc, nr_to_scan),
+               .gfp_mask   = shrink_param(sc, gfp_mask)
+       };
+#&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; !defined(HAVE_SHRINKER_WANT_SHRINK_PTR) &amp;amp;&amp;amp; !defined(HAVE_SHRINK_CONTROL)
+       struct shrinker *shrinker = NULL;
+#endif
+
+       (void)osc_cache_shrink_scan(shrinker, &amp;amp;scv);
+
+       &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; osc_cache_shrink_count(shrinker, &amp;amp;scv);
+}
+#endif
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Is there any particular reason to return the value from osc_cache_shrink_count() instead of osc_cache_shrink_scan() itself?&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;
         kswapd0-43    [003] ....  2885.831749: mm_shrink_slab_start: osc_cache_shrink+0x0/0x60 [osc] ffff8800cd67c1c0: objects to shrink 56 gfp_flags GFP_KERNEL pgs_scanned 222 lru_pgs 665761 cache items 645137 delta 430 total_scan 486
         kswapd0-43    [003] d...  2885.831751: r_osc_cache_shrink_scan_0: (osc_cache_shrink+0x36/0x60 [osc] &amp;lt;- osc_cache_shrink_scan) arg1=0x0
         kswapd0-43    [003] d...  2885.831752: r_osc_cache_shrink_0: (shrink_slab+0x15c/0x340 &amp;lt;- osc_cache_shrink) arg1=0x9d811
         kswapd0-43    [003] d...  2885.832371: r_osc_cache_shrink_scan_0: (osc_cache_shrink+0x36/0x60 [osc] &amp;lt;- osc_cache_shrink_scan) arg1=0x80
         kswapd0-43    [003] d...  2885.832374: r_osc_cache_shrink_0: (shrink_slab+0x175/0x340 &amp;lt;- osc_cache_shrink) arg1=0x9d791
         kswapd0-43    [003] d...  2885.832377: r_osc_cache_shrink_scan_0: (osc_cache_shrink+0x36/0x60 [osc] &amp;lt;- osc_cache_shrink_scan) arg1=0x0
         kswapd0-43    [003] d...  2885.832378: r_osc_cache_shrink_0: (shrink_slab+0x15c/0x340 &amp;lt;- osc_cache_shrink) arg1=0x9d791
         kswapd0-43    [003] d...  2885.833002: r_osc_cache_shrink_scan_0: (osc_cache_shrink+0x36/0x60 [osc] &amp;lt;- osc_cache_shrink_scan) arg1=0x80
         kswapd0-43    [003] d...  2885.833004: r_osc_cache_shrink_0: (shrink_slab+0x175/0x340 &amp;lt;- osc_cache_shrink) arg1=0x9d711
         kswapd0-43    [003] d...  2885.833008: r_osc_cache_shrink_scan_0: (osc_cache_shrink+0x36/0x60 [osc] &amp;lt;- osc_cache_shrink_scan) arg1=0x0
         kswapd0-43    [003] d...  2885.833009: r_osc_cache_shrink_0: (shrink_slab+0x15c/0x340 &amp;lt;- osc_cache_shrink) arg1=0x9d711
         kswapd0-43    [003] d...  2885.833569: r_osc_cache_shrink_scan_0: (osc_cache_shrink+0x36/0x60 [osc] &amp;lt;- osc_cache_shrink_scan) arg1=0x80
         kswapd0-43    [003] d...  2885.833571: r_osc_cache_shrink_0: (shrink_slab+0x175/0x340 &amp;lt;- osc_cache_shrink) arg1=0x9d691
         kswapd0-43    [003] ....  2885.833573: mm_shrink_slab_end: osc_cache_shrink+0x0/0x60 [osc] ffff8800cd67c1c0: unused scan count 56 &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; scan count 102 total_scan 46 last shrinker &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; val 644753
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;It seems like in such a scenario, vmscan requested 3 times to scan 128 objects, osc_cache_shrink_scan() reported 3 times that 128 objects were freed. However, the shrinker returned not 0x80;0x80;0x80, but 0x9d791; 0x9d711; 0x9d691, reported as &quot;last shrinker return val 644753&quot;.&lt;/p&gt;

&lt;p&gt;P.S. arg1 is $retval for osc_cache* retprobes.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="27409">LU-5841</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="18708" name="Hyperion Performance LU-6842.xlsx" size="95581" author="cliffw" created="Thu, 20 Aug 2015 15:17:41 +0000"/>
                            <attachment id="18700" name="Hyperion Performance LU-6842.xlsx" size="91859" author="cliffw" created="Wed, 19 Aug 2015 17:34:44 +0000"/>
                    </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|hzxi2f:</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>
                                                                                                                                                                                                                                                                                                                                                                                                                </customfields>
    </item>
</channel>
</rss>