<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 03:12: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-14712] improve ldiskfs &quot;-o discard&quot; performance</title>
                <link>https://jira.whamcloud.com/browse/LU-14712</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;The current &quot;&lt;tt&gt;-o discard&lt;/tt&gt;&quot; mount option for ldiskfs enables on-the-fly TRIM of underlying flash devices (or thinly-provisioned LUNs).  However, the current implementation hurts performance because it is done synchronously in the context of the JBD2 commit thread as a commit callback, which blocks later transaction commits.&lt;/p&gt;

&lt;p&gt;There is work being done in the upstream kernel to improve &quot;&lt;tt&gt;-o discard&lt;/tt&gt;&quot; to use an async worker thread to issue the TRIM commands, and do this on a per-blockgroup basis, rather than issuing the trim on a per-extent basis.&lt;/p&gt;

&lt;p&gt;Current patch series is at:&lt;br/&gt;
&lt;a href=&quot;https://marc.info/?l=linux-ext4&amp;amp;m=162201857620045&amp;amp;w=4&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://marc.info/?l=linux-ext4&amp;amp;m=162201857620045&amp;amp;w=4&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There are also patches by Shilong that make the TRIM state for a block group persistent, so that running TRIM with &lt;tt&gt;mke2fs&lt;/tt&gt; does not also lead to &lt;tt&gt;fstrim&lt;/tt&gt; resubmitting TRIM requests for all of the groups again immediately after mount/remount.&lt;/p&gt;

&lt;p&gt;Most recent patches at:&lt;br/&gt;
&lt;a href=&quot;https://marc.info/?l=linux-ext4&amp;amp;m=159283169109297&amp;amp;w=4&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://marc.info/?l=linux-ext4&amp;amp;m=159283169109297&amp;amp;w=4&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I think the combination of these two patches would improve ongoing ldiskfs performance on flash devices significantly.&lt;/p&gt;</description>
                <environment></environment>
        <key id="64414">LU-14712</key>
            <summary>improve ldiskfs &quot;-o discard&quot; performance</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="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="dongyang">Dongyang Li</assignee>
                                    <reporter username="adilger">Andreas Dilger</reporter>
                        <labels>
                            <label>NVME</label>
                            <label>ldiskfs</label>
                            <label>performance</label>
                    </labels>
                <created>Wed, 26 May 2021 21:06:47 +0000</created>
                <updated>Fri, 15 Dec 2023 18:22:18 +0000</updated>
                                                                                <due></due>
                            <votes>2</votes>
                                    <watches>10</watches>
                                                                            <comments>
                            <comment id="371583" author="adilger" created="Tue, 9 May 2023 02:18:53 +0000"  >&lt;p&gt;Patches to implement the &lt;tt&gt;EXT4_BG_WAS_TRIMMED&lt;/tt&gt; flag to persistently store the &lt;tt&gt;TRIM&lt;/tt&gt; state for each block group are available at:&lt;/p&gt;

&lt;p&gt;e2fsprogs patches:&lt;br/&gt;
&lt;a href=&quot;https://patchwork.ozlabs.org/project/linux-ext4/patch/1590588525-29669-1-git-send-email-wangshilong1991@gmail.com/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://patchwork.ozlabs.org/project/linux-ext4/patch/1590588525-29669-1-git-send-email-wangshilong1991@gmail.com/&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;https://patchwork.ozlabs.org/project/linux-ext4/patch/1590588525-29669-2-git-send-email-wangshilong1991@gmail.com/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://patchwork.ozlabs.org/project/linux-ext4/patch/1590588525-29669-2-git-send-email-wangshilong1991@gmail.com/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;ext4 kernel patch:&lt;br/&gt;
&lt;a href=&quot;https://patchwork.ozlabs.org/project/linux-ext4/patch/1592831677-13945-1-git-send-email-wangshilong1991@gmail.com/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://patchwork.ozlabs.org/project/linux-ext4/patch/1592831677-13945-1-git-send-email-wangshilong1991@gmail.com/&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;https://patchwork.ozlabs.org/project/linux-ext4/patch/1592835419-7841-1-git-send-email-wangshilong1991@gmail.com/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://patchwork.ozlabs.org/project/linux-ext4/patch/1592835419-7841-1-git-send-email-wangshilong1991@gmail.com/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It seems possible to use the &lt;tt&gt;EXT4_BG_WAS_TRIMMED&lt;/tt&gt; tracking to optimize the &lt;tt&gt;fstrim&lt;/tt&gt; operation, as well as reduce &quot;&lt;tt&gt;-o discard&lt;/tt&gt;&quot; overhead instead of keeping an active list of every allocation extent to trim:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;keep a list of groups to be trimmed on the superblock&lt;/li&gt;
	&lt;li&gt;at mount time during group descriptor load, add groups to be trimmed to list (no &lt;tt&gt;EXT4_BG_WAS_TRIMMED&lt;/tt&gt; flag)&lt;/li&gt;
	&lt;li&gt;skip TRIM for groups that do not have many large extents (easily seen from mballoc buddy bitmap)&lt;/li&gt;
	&lt;li&gt;add a group to list during runtime when many blocks in the group have been freed&lt;/li&gt;
	&lt;li&gt;keep a simple &quot;active&quot; state for the filesystem (e.g. open journal transaction, read or write in the past N seconds?)&lt;/li&gt;
	&lt;li&gt;start an &lt;tt&gt;fstrim_DEVNO&lt;/tt&gt; thread in the background when &quot;&lt;tt&gt;-o discard&lt;/tt&gt;&quot; (or &quot;&lt;tt&gt;-o fstrim&lt;/tt&gt;&quot;) is used&lt;/li&gt;
	&lt;li&gt;wake up &lt;tt&gt;fstrim_DEVNO&lt;/tt&gt; when filesystem is otherwise idle and trim inactive groups on superblock list&lt;/li&gt;
&lt;/ul&gt;

</comment>
                            <comment id="382078" author="gerrit" created="Fri, 11 Aug 2023 05:50:17 +0000"  >&lt;p&gt;&quot;Li Dongyang &amp;lt;dongyangli@ddn.com&amp;gt;&quot; uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/c/fs/lustre-release/+/51923&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/fs/lustre-release/+/51923&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-14712&quot; title=&quot;improve ldiskfs &amp;quot;-o discard&amp;quot; performance&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-14712&quot;&gt;LU-14712&lt;/a&gt; ldiskfs: introduce EXT4_BG_TRIMMED to optimize fstrim&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: c01f5755e88a39429f2f8af16e6ca2912de0c624&lt;/p&gt;</comment>
                            <comment id="382079" author="gerrit" created="Fri, 11 Aug 2023 05:50:27 +0000"  >&lt;p&gt;&quot;Li Dongyang &amp;lt;dongyangli@ddn.com&amp;gt;&quot; uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/c/tools/e2fsprogs/+/51924&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/tools/e2fsprogs/+/51924&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-14712&quot; title=&quot;improve ldiskfs &amp;quot;-o discard&amp;quot; performance&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-14712&quot;&gt;LU-14712&lt;/a&gt; e2fsprogs: support EXT2_FLAG_BG_TRIMMED and EXT2_FLAGS_TRACK_TRIM&lt;br/&gt;
Project: tools/e2fsprogs&lt;br/&gt;
Branch: master-lustre&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: c352e90a9d02af8a94f4fb8e28a95016da2f2d68&lt;/p&gt;</comment>
                            <comment id="384096" author="gerrit" created="Tue, 29 Aug 2023 17:33:36 +0000"  >&lt;p&gt;&quot;Andreas Dilger &amp;lt;adilger@whamcloud.com&amp;gt;&quot; merged in patch &lt;a href=&quot;https://review.whamcloud.com/c/tools/e2fsprogs/+/51924/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/tools/e2fsprogs/+/51924/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-14712&quot; title=&quot;improve ldiskfs &amp;quot;-o discard&amp;quot; performance&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-14712&quot;&gt;LU-14712&lt;/a&gt; e2fsprogs: support EXT2_FLAG_BG_TRIMMED and EXT2_FLAGS_TRACK_TRIM&lt;br/&gt;
Project: tools/e2fsprogs&lt;br/&gt;
Branch: master-lustre&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 3bf271a76463c3d238f342e39f4f2813e7df6442&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                                        </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="75639">LU-16750</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|i01vg7:</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>