<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 01:30:15 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-3018] small reads occur during bulk writes hurting overall performance</title>
                <link>https://jira.whamcloud.com/browse/LU-3018</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;During obdfilter-survey on OSS node or IOR write test from the client there are small reads during bulk writes which impact the performance of the OST.&lt;br/&gt;
Based on the block trace and dumpe2fs output these reads are for ldiskfs block bitmaps.&lt;/p&gt;

&lt;p&gt;A patch will be uploaded shortly.&lt;/p&gt;</description>
                <environment></environment>
        <key id="18062">LU-3018</key>
            <summary>small reads occur during bulk writes hurting overall performance</summary>
                <type id="1" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.whamcloud.com/images/icons/priorities/major.svg">Major</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="2">Won&apos;t Fix</resolution>
                                        <assignee username="cliffw">Cliff White</assignee>
                                    <reporter username="panda">Andrew Perepechko</reporter>
                        <labels>
                            <label>patch</label>
                    </labels>
                <created>Fri, 22 Mar 2013 13:48:07 +0000</created>
                <updated>Fri, 9 May 2014 19:41:50 +0000</updated>
                            <resolved>Fri, 9 May 2014 19:41:50 +0000</resolved>
                                    <version>Lustre 2.4.0</version>
                                                        <due></due>
                            <votes>0</votes>
                                    <watches>5</watches>
                                                                            <comments>
                            <comment id="54655" author="panda" created="Fri, 22 Mar 2013 14:01:05 +0000"  >&lt;p&gt;&lt;a href=&quot;http://review.whamcloud.com/#change,5811&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/#change,5811&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="54656" author="panda" created="Fri, 22 Mar 2013 14:03:53 +0000"  >&lt;p&gt;The logs showing how bitmap pages are evicted:&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; [&amp;lt;ffffffff81135c28&amp;gt;] ? __remove_mapping+0xd8/0x160
 [&amp;lt;ffffffff81136b7d&amp;gt;] ? shrink_page_list.clone.0+0x47d/0x5e0
 [&amp;lt;ffffffff81136fd0&amp;gt;] ? shrink_inactive_list+0x2f0/0x730
 [&amp;lt;ffffffffa04e90fd&amp;gt;] ? cfs_hash_rw_unlock+0x1d/0x30 [libcfs]
 [&amp;lt;ffffffffa04e7ac4&amp;gt;] ? cfs_hash_dual_bd_unlock+0x34/0x60 [libcfs]
 [&amp;lt;ffffffff8113821f&amp;gt;] ? shrink_zone+0x38f/0x510
 [&amp;lt;ffffffff8109cc99&amp;gt;] ? ktime_get_ts+0xa9/0xe0
 [&amp;lt;ffffffff8113849e&amp;gt;] ? do_try_to_free_pages+0xfe/0x520
 [&amp;lt;ffffffff81138abf&amp;gt;] ? try_to_free_pages+0x9f/0x130
 [&amp;lt;ffffffff81139c40&amp;gt;] ? isolate_pages_global+0x0/0x380
 [&amp;lt;ffffffff811301a7&amp;gt;] ? __alloc_pages_nodemask+0x447/0x920
 [&amp;lt;ffffffff81164e2a&amp;gt;] ? alloc_pages_current+0xaa/0x110
 [&amp;lt;ffffffff8111ccf7&amp;gt;] ? __page_cache_alloc+0x87/0x90
 [&amp;lt;ffffffff8111db0f&amp;gt;] ? find_or_create_page+0x4f/0xb0

 [&amp;lt;ffffffff81135c28&amp;gt;] ? __remove_mapping+0xd8/0x160
 [&amp;lt;ffffffff81135cc6&amp;gt;] ? remove_mapping+0x16/0x30
 [&amp;lt;ffffffff81134bf2&amp;gt;] ? invalidate_inode_page+0x82/0xb0
 [&amp;lt;ffffffff81134efa&amp;gt;] ? invalidate_mapping_pages+0xda/0x150
 [&amp;lt;ffffffff814fb8eb&amp;gt;] ? _spin_unlock+0x2b/0x40
 [&amp;lt;ffffffff811a2ec0&amp;gt;] ? shrink_icache_memory+0x1c0/0x2e0
 [&amp;lt;ffffffff811a2f95&amp;gt;] ? shrink_icache_memory+0x295/0x2e0
 [&amp;lt;ffffffff811362ed&amp;gt;] ? shrink_slab+0x14d/0x1b0
 [&amp;lt;ffffffff8113963d&amp;gt;] ? balance_pgdat+0x5ad/0x810
 [&amp;lt;ffffffff81139c40&amp;gt;] ? isolate_pages_global+0x0/0x380
 [&amp;lt;ffffffff811399e4&amp;gt;] ? kswapd+0x144/0x3a0

 [&amp;lt;ffffffff81139deb&amp;gt;] isolate_pages_global+0x1ab/0x380
 [&amp;lt;ffffffff81136d99&amp;gt;] ? shrink_inactive_list+0xb9/0x730
 [&amp;lt;ffffffff81136e42&amp;gt;] shrink_inactive_list+0x162/0x730
 [&amp;lt;ffffffffa04e90fd&amp;gt;] ? cfs_hash_rw_unlock+0x1d/0x30 [libcfs]
 [&amp;lt;ffffffffa04e7ac4&amp;gt;] ? cfs_hash_dual_bd_unlock+0x34/0x60 [libcfs]
 [&amp;lt;ffffffffa04e9c12&amp;gt;] ? cfs_hash_lookup+0x82/0xa0 [libcfs]
 [&amp;lt;ffffffffa06a20f5&amp;gt;] ? cl_env_fetch+0x25/0x80 [obdclass]
 [&amp;lt;ffffffff8113821f&amp;gt;] shrink_zone+0x38f/0x510
 [&amp;lt;ffffffff811397a9&amp;gt;] balance_pgdat+0x719/0x810
 [&amp;lt;ffffffff81139c40&amp;gt;] ? isolate_pages_global+0x0/0x380
 [&amp;lt;ffffffff811399e4&amp;gt;] kswapd+0x144/0x3a0
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Note they are not passing through shrink_active_list();&lt;/p&gt;

&lt;p&gt;I_NEW is needed to avoid the following code path:&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; [&amp;lt;ffffffff81134efa&amp;gt;] ? invalidate_mapping_pages+0xda/0x150
 [&amp;lt;ffffffff814fb8eb&amp;gt;] ? _spin_unlock+0x2b/0x40
 [&amp;lt;ffffffff811a2ec0&amp;gt;] ? shrink_icache_memory+0x1c0/0x2e0
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="54659" author="panda" created="Fri, 22 Mar 2013 14:38:21 +0000"  >&lt;p&gt;Xyratex-bug-id: MRP-691&lt;/p&gt;</comment>
                            <comment id="54679" author="simmonsja" created="Fri, 22 Mar 2013 17:55:51 +0000"  >&lt;p&gt;Would you mind if I update the patch to support SLES11 SP2 as well?&lt;/p&gt;</comment>
                            <comment id="54680" author="panda" created="Fri, 22 Mar 2013 18:11:00 +0000"  >&lt;p&gt;Hello James!&lt;br/&gt;
That would be very nice.&lt;br/&gt;
Thank you.&lt;/p&gt;</comment>
                            <comment id="54722" author="panda" created="Sat, 23 Mar 2013 19:37:26 +0000"  >&lt;p&gt;Using mark_page_accessed() is not enough to avoid page eviction.&lt;/p&gt;

&lt;p&gt;find_or_create_page() allocates a page and links it to the corresponding cpu buffer.&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;struct page *find_or_create_page(struct address_space *mapping,
                pgoff_t index, gfp_t gfp_mask)
{
        struct page *page;
        &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; err;
repeat:
        page = find_lock_page(mapping, index);
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (!page) {
                page = __page_cache_alloc(gfp_mask);
                &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (!page)
                        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; NULL;
                /*
                 * We want a regular kernel memory (not highmem or DMA etc)
                 * allocation &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; the radix tree nodes, but we need to honour
                 * the context-specific requirements the caller has asked &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt;.
                 * GFP_RECLAIM_MASK collects those requirements.
                 */
                err = add_to_page_cache_lru(page, mapping, index,
                        (gfp_mask &amp;amp; GFP_RECLAIM_MASK));
...
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&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;void __lru_cache_add(struct page *page, &lt;span class=&quot;code-keyword&quot;&gt;enum&lt;/span&gt; lru_list lru)
{
        struct pagevec *pvec = &amp;amp;get_cpu_var(lru_add_pvecs)[lru];

        page_cache_get(page);
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (!pagevec_add(pvec, page))
                ____pagevec_lru_add(pvec, lru);
        put_cpu_var(lru_add_pvecs);
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Note that ____pagevec_lru_add() which calls SetPageLRU() is only performed when the cpu buffer is full.&lt;/p&gt;

&lt;p&gt;make_page_accessed() activates the page only if it is on LRU. Otherwise, the page is marked or kept referenced:&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;void mark_page_accessed(struct page *page)
{
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (!PageActive(page) &amp;amp;&amp;amp; !PageUnevictable(page) &amp;amp;&amp;amp;
                        PageReferenced(page) &amp;amp;&amp;amp; PageLRU(page)) {
                activate_page(page);
                ClearPageReferenced(page);
        } &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (!PageReferenced(page)) {
                SetPageReferenced(page);
        }
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;shrink_inactive_list() drains the buffer and evicts the pages even if mark_page_accessed() was called a lot of times:&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;&lt;span class=&quot;code-keyword&quot;&gt;static&lt;/span&gt; unsigned &lt;span class=&quot;code-object&quot;&gt;long&lt;/span&gt; shrink_inactive_list(unsigned &lt;span class=&quot;code-object&quot;&gt;long&lt;/span&gt; max_scan,
                        struct zone *zone, struct scan_control *sc,
                        &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; priority, &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; file)
{
        LIST_HEAD(page_list);
        struct pagevec pvec;
        unsigned &lt;span class=&quot;code-object&quot;&gt;long&lt;/span&gt; nr_scanned = 0;
        unsigned &lt;span class=&quot;code-object&quot;&gt;long&lt;/span&gt; nr_reclaimed = 0;
        unsigned &lt;span class=&quot;code-object&quot;&gt;long&lt;/span&gt; nr_dirty = 0;
        unsigned &lt;span class=&quot;code-object&quot;&gt;long&lt;/span&gt; nr_writeback = 0;
        struct zone_reclaim_stat *reclaim_stat = get_reclaim_stat(zone, sc);

        &lt;span class=&quot;code-keyword&quot;&gt;while&lt;/span&gt; (unlikely(too_many_isolated(zone, file, sc))) {
                congestion_wait(BLK_RW_ASYNC, HZ/10);

                &lt;span class=&quot;code-comment&quot;&gt;/* We are about to die and free our memory. Return now. */&lt;/span&gt;
                &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (fatal_signal_pending(current))
                        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; SWAP_CLUSTER_MAX;
        }

        pagevec_init(&amp;amp;pvec, 1);

        lru_add_drain();
...
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="54773" author="keith" created="Mon, 25 Mar 2013 17:19:39 +0000"  >&lt;p&gt;Can you please post any detailed performance data you have? What environment are you testing in and what results do you see? &lt;/p&gt;</comment>
                            <comment id="58958" author="keith" created="Tue, 21 May 2013 05:59:17 +0000"  >&lt;p&gt;Andrew Perepechko, Any update?&lt;/p&gt;</comment>
                            <comment id="59045" author="panda" created="Wed, 22 May 2013 11:24:20 +0000"  >&lt;p&gt;Keith Mannthey, there is a lot ongoing activity in LKML.&lt;/p&gt;</comment>
                            <comment id="59070" author="keith" created="Wed, 22 May 2013 15:54:17 +0000"  >&lt;p&gt;That is excellent news.  &lt;/p&gt;</comment>
                            <comment id="67821" author="panda" created="Fri, 27 Sep 2013 15:41:22 +0000"  >&lt;p&gt;this ticket should be closed and the long-term solution backported from the vanilla kernel&lt;/p&gt;</comment>
                            <comment id="83665" author="cliffw" created="Fri, 9 May 2014 19:41:38 +0000"  >&lt;p&gt;Closing ticket per Andrew&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|hzvlz3:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10090" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>7341</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>