<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 03:01:07 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-13419] Simplify osc_enter_cache_try</title>
                <link>https://jira.whamcloud.com/browse/LU-13419</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;When doing writes to many files, one bottleneck on a client&lt;br/&gt;
currently seems to be the grant code, specifically&lt;br/&gt;
spinning in the lock around:&lt;br/&gt;
osc_enter_cache_try&lt;/p&gt;

&lt;p&gt;The contention is &lt;b&gt;just&lt;/b&gt; on osc_enter_cache_try, so there&apos;s&lt;br/&gt;
no obvious way to refactor the lock, etc. Instead, we can&lt;br/&gt;
look at where time is going in the function.&lt;/p&gt;

&lt;p&gt;Two things that stand out:&lt;br/&gt;
obd_dirty_pages is an atomic, but it is &lt;b&gt;always&lt;/b&gt; accessed&lt;br/&gt;
under the cl_loi_list_lock, so it can be a regular long.&lt;br/&gt;
In my perf tracing, the add_return to this is 50% of the&lt;br/&gt;
time in this function.&lt;/p&gt;

&lt;p&gt;The assert_spin_lock in osc_consume_write_grant generates&lt;br/&gt;
an atomic read of the cl_loi_list_lock lock value. This&lt;br/&gt;
isn&apos;t too painful, but it would be nice to cut it out of&lt;br/&gt;
the hot path. There is already a comment saying the&lt;br/&gt;
cl_loi_list_lock must be held, and this is considered&lt;br/&gt;
enough in most places in Lustre.&lt;/p&gt;

&lt;p&gt;mpirun -np 36 $IOR -o $LUSTRE -w -t 1M -b 2G -i 1 -F&lt;/p&gt;

&lt;p&gt;That&apos;s 36 processes on one client, writing to separate&lt;br/&gt;
files.&lt;/p&gt;

&lt;p&gt;Before patch:&lt;br/&gt;
5942.34 MiB/s&lt;br/&gt;
After patch:&lt;br/&gt;
11541 MiB/s&lt;/p&gt;

&lt;p&gt;Looking in perf, the change is huge:&lt;br/&gt;
I go from spending 60% of the time in osc_enter_cache_try&lt;br/&gt;
to less than 1%.&lt;/p&gt;</description>
                <environment></environment>
        <key id="58667">LU-13419</key>
            <summary>Simplify osc_enter_cache_try</summary>
                <type id="4" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11310&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="3" iconUrl="https://jira.whamcloud.com/images/icons/priorities/major.svg">Major</priority>
                        <status id="1" iconUrl="https://jira.whamcloud.com/images/icons/statuses/open.png" description="The issue is open and ready for the assignee to start work on it.">Open</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="paf0186">Patrick Farrell</assignee>
                                    <reporter username="paf0186">Patrick Farrell</reporter>
                        <labels>
                            <label>patch</label>
                            <label>performance</label>
                    </labels>
                <created>Tue, 7 Apr 2020 15:54:44 +0000</created>
                <updated>Thu, 15 Jul 2021 13:27:37 +0000</updated>
                                                                                <due></due>
                            <votes>0</votes>
                                    <watches>5</watches>
                                                                            <comments>
                            <comment id="267037" author="paf0186" created="Tue, 7 Apr 2020 15:55:47 +0000"  >&lt;p&gt;&lt;a href=&quot;https://review.whamcloud.com/#/c/38151/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/#/c/38151/&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="267480" author="gerrit" created="Mon, 13 Apr 2020 16:32:06 +0000"  >&lt;p&gt;Patrick Farrell (farr0186@gmail.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/38214&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/38214&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-13419&quot; title=&quot;Simplify osc_enter_cache_try&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-13419&quot;&gt;LU-13419&lt;/a&gt; osc: Move shrink update to per-write&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: ab3d3bf42fb7a1468880474bd00fb0a1f6a493c0&lt;/p&gt;</comment>
                            <comment id="270691" author="adilger" created="Wed, 20 May 2020 09:05:54 +0000"  >&lt;p&gt;What about &quot;&lt;tt&gt;atomic_long_t ccc_lru_left&lt;/tt&gt;&quot;?&lt;/p&gt;</comment>
                            <comment id="304444" author="gerrit" created="Mon, 14 Jun 2021 16:43:35 +0000"  >&lt;p&gt;Oleg Drokin (green@whamcloud.com) merged in patch &lt;a href=&quot;https://review.whamcloud.com/38214/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/38214/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-13419&quot; title=&quot;Simplify osc_enter_cache_try&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-13419&quot;&gt;LU-13419&lt;/a&gt; osc: Move shrink update to per-write&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: c24c25dc1b84912063f79e44602526c482ca0479&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="58216">LU-13309</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <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|i00xa7:</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>