<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:51:50 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-12353] optimizations for ldiskfs quota updates</title>
                <link>https://jira.whamcloud.com/browse/LU-12353</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;We can slightly improve quota usage accounting times by avoiding unnecessary ondisk updates.&lt;/p&gt;

&lt;p&gt;A patch and explanation will be added.&lt;/p&gt;</description>
                <environment></environment>
        <key id="55780">LU-12353</key>
            <summary>optimizations for ldiskfs quota updates</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="panda">Andrew Perepechko</assignee>
                                    <reporter username="panda">Andrew Perepechko</reporter>
                        <labels>
                            <label>patch</label>
                            <label>performance</label>
                    </labels>
                <created>Wed, 29 May 2019 17:07:04 +0000</created>
                <updated>Wed, 31 May 2023 20:19:28 +0000</updated>
                            <resolved>Thu, 3 Dec 2020 14:48:42 +0000</resolved>
                                                    <fixVersion>Lustre 2.14.0</fixVersion>
                    <fixVersion>Lustre 2.16.0</fixVersion>
                    <fixVersion>Lustre 2.15.3</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>5</watches>
                                                                            <comments>
                            <comment id="247978" author="gerrit" created="Wed, 29 May 2019 17:08:30 +0000"  >&lt;p&gt;Andrew Perepechko (c17827@cray.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/34992&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/34992&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-12353&quot; title=&quot;optimizations for ldiskfs quota updates&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-12353&quot;&gt;&lt;del&gt;LU-12353&lt;/del&gt;&lt;/a&gt; ldiskfs: speedup quota journalling&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 44215f0c452da18577475ca4c8a50e147e9e6a2b&lt;/p&gt;</comment>
                            <comment id="247992" author="panda" created="Wed, 29 May 2019 17:27:55 +0000"  >&lt;p&gt;Why this patch improves performance:&lt;/p&gt;

&lt;p&gt;Multiple threads will not block on dqio_mutex in dquot_commit().&lt;/p&gt;

&lt;p&gt;If thread A is writing dquot and another thread B is waiting for dqio_mutex, other threads can just skip dquot update. Thread B is guaranteed to write the latest data. Once it starts writing, it will clear DQ_MOD_B and new threads entering ldiskfs_mark_dquot_dirty() will have to queue at least one dquot update.&lt;/p&gt;

&lt;p&gt;So we are moving from the following worst case (threads ordered by the time they called ldiskfs_mark_dquot_dirty()):&lt;br/&gt;
thread 1) executing dquot_commit()&lt;br/&gt;
thread 2) waiting in dquot_commit()&lt;br/&gt;
...&lt;br/&gt;
thread N) waiting in dquot_commit()&lt;/p&gt;

&lt;p&gt;to the following case:&lt;/p&gt;

&lt;p&gt;thread 1) executing dquot_commit()&lt;br/&gt;
thread 2) waiting in dquot_commit()&lt;br/&gt;
thread 3) can exit ldiskfs_mark_dquot_dirty() immediately since thread 2 is guaranteed to write the latest data to disk&lt;br/&gt;
...&lt;br/&gt;
thread N) can exit ldiskfs_mark_dquot_dirty() immediately since thread 2 is guaranteed to write the latest data to disk&lt;/p&gt;

&lt;p&gt;Although, in the first case, a subset of thread 2, thread 3, ... thead N may find that DQ_MOD_B is already cleared so they can exit dquot_commit() without updating the disk buffer, each of them will still have to wait for dqio_mutex to do that.&lt;/p&gt;

&lt;p&gt;Atomicity concerns:&lt;/p&gt;

&lt;p&gt;The updates are guaranteed to be atomic since we always call ldiskfs_mark_dquot_dirty() with a transaction handle. And if multiple threads enter this code at the same time, they share handles to the same transaction by jbd2 design.&lt;/p&gt;

&lt;p&gt;Jan Kara mentioned in LKML that this is not the case for dqctl calls which can call ext4_mark_dquot_dirty() without a jbd2 handle, but this case is not relevant for Lustre.&lt;/p&gt;

&lt;p&gt;Significant dqio_mutex redesign was planned, so this patch was rejected in LKML, but we can at least slightly improve performance without any kernel fs/quota modification for the older kernels.&lt;/p&gt;</comment>
                            <comment id="272568" author="adilger" created="Thu, 11 Jun 2020 07:55:20 +0000"  >&lt;p&gt;Shuichi, would you be able to test out the referenced patch to see if it improves performance for us?  This is &lt;b&gt;not&lt;/b&gt; urgent, since I don&apos;t think e.g. we have quota enabled for IO500, but if we always have quota enabled on customer systems then it would be nice to add a 10-15% improvement (as mentioned in the comments in Gerrit on this patch) &quot;for free&quot; if this 2-line patch helps.&lt;/p&gt;</comment>
                            <comment id="272571" author="wshilong" created="Thu, 11 Jun 2020 08:15:47 +0000"  >&lt;p&gt;Acutally, this could help IO500 since we have quota accounting by default.&lt;/p&gt;</comment>
                            <comment id="272588" author="sihara" created="Thu, 11 Jun 2020 09:32:08 +0000"  >&lt;p&gt;Andreas, Sure. I will add my Todo list and test this patch too. Just an confirmation. Do we expect performance improvement even no quota enforcement, but just quota accounting on quota slave? quota accounting is always enabled by default, right?&lt;/p&gt;</comment>
                            <comment id="272600" author="panda" created="Thu, 11 Jun 2020 12:37:22 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.whamcloud.com/secure/ViewProfile.jspa?name=sihara&quot; class=&quot;user-hover&quot; rel=&quot;sihara&quot;&gt;sihara&lt;/a&gt;,&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;Do we expect performance improvement even no quota enforcement, but just quota accounting on quota slave?&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Yes.&lt;/p&gt;</comment>
                            <comment id="286574" author="gerrit" created="Thu, 3 Dec 2020 07:26:44 +0000"  >&lt;p&gt;Oleg Drokin (green@whamcloud.com) merged in patch &lt;a href=&quot;https://review.whamcloud.com/34992/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/34992/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-12353&quot; title=&quot;optimizations for ldiskfs quota updates&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-12353&quot;&gt;&lt;del&gt;LU-12353&lt;/del&gt;&lt;/a&gt; ldiskfs: speedup quota journalling&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: dad25f258e50895b4bd5fce30765599a7a490aa0&lt;/p&gt;</comment>
                            <comment id="286605" author="pjones" created="Thu, 3 Dec 2020 14:48:42 +0000"  >&lt;p&gt;Landed for 2.14&lt;/p&gt;</comment>
                            <comment id="371203" author="gerrit" created="Tue, 2 May 2023 21:20:31 +0000"  >&lt;p&gt;&quot;Jian Yu &amp;lt;yujian@whamcloud.com&amp;gt;&quot; uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/c/fs/lustre-release/+/50853&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/fs/lustre-release/+/50853&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-12353&quot; title=&quot;optimizations for ldiskfs quota updates&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-12353&quot;&gt;&lt;del&gt;LU-12353&lt;/del&gt;&lt;/a&gt; ldiskfs: add ext4-dquot-commit-speedup patch to more series&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 8843159caf504c8fc22402ad5b06594da378bae7&lt;/p&gt;</comment>
                            <comment id="372161" author="gerrit" created="Fri, 12 May 2023 19:02:35 +0000"  >&lt;p&gt;&quot;Jian Yu &amp;lt;yujian@whamcloud.com&amp;gt;&quot; uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/c/fs/lustre-release/+/50983&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/fs/lustre-release/+/50983&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-12353&quot; title=&quot;optimizations for ldiskfs quota updates&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-12353&quot;&gt;&lt;del&gt;LU-12353&lt;/del&gt;&lt;/a&gt; ldiskfs: add ext4-dquot-commit-speedup patch to more series&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: b2_15&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 2a33165775f7fefa9682432869e920ead225352c&lt;/p&gt;</comment>
                            <comment id="373697" author="gerrit" created="Sat, 27 May 2023 01:27:12 +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/+/50983/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/fs/lustre-release/+/50983/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-12353&quot; title=&quot;optimizations for ldiskfs quota updates&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-12353&quot;&gt;&lt;del&gt;LU-12353&lt;/del&gt;&lt;/a&gt; ldiskfs: add ext4-dquot-commit-speedup patch to more series&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: b2_15&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 5305f6efdd3aae1b1034eb6a9d880f6db8559dbf&lt;/p&gt;</comment>
                            <comment id="374002" author="gerrit" created="Wed, 31 May 2023 19:00:42 +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/+/50853/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/fs/lustre-release/+/50853/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-12353&quot; title=&quot;optimizations for ldiskfs quota updates&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-12353&quot;&gt;&lt;del&gt;LU-12353&lt;/del&gt;&lt;/a&gt; ldiskfs: add ext4-dquot-commit-speedup patch to more series&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: ec8f93afa0559ef6bfcdf701f4c1a50207901ef2&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="48478">LU-10034</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|i00h5j:</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>