<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:57:41 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-13021] WBC&#65306;different flush modes</title>
                <link>https://jira.whamcloud.com/browse/LU-13021</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;To meet different requirements, we design three flush modes for WBC:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;WBC_FLUSH_LAZY&lt;br/&gt;
 In the lazy flush mode, a client never flushes dirty cache and drops the root WBC EX lock actively unless it has to in the following cases:
	&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
		&lt;li&gt;The client needs to revoke the cached root WBC EX lock when the directory is Conflict accessing from a remote client or shrink the LRU locks in the client lock namespace;&lt;/li&gt;
		&lt;li&gt;The capacity of the cache on the client is used out;&lt;/li&gt;
		&lt;li&gt;The capacity limits for the cache on the client is reached;&lt;/li&gt;
		&lt;li&gt;A application or a user wants to cleanup or uncache the cached data on the client manually.&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;This cache mode comes from the following requirements:&lt;br/&gt;
 &amp;#8211; Users want to reduce the impact on the performance: When flushing metadata to MDT and assimilate data, it may block newly creations and data I/O, and have impact on the performance.&lt;br/&gt;
 &amp;#8211; The application may create many files and remove them later. It may do useless work if flush the cache periodically. If the file was flushed to MDT, it may still need to be deleted on MDT later&lt;br/&gt;
 &amp;#8211; Use case:&lt;br/&gt;
 &lt;em&gt;lfs wbc cache $DIR&lt;/em&gt;&lt;br/&gt;
 &lt;em&gt;do a job under directory $DIR, but do not flush the cache.&lt;/em&gt;&lt;br/&gt;
 &lt;em&gt;lfs wbc uncache $DIR&lt;/em&gt; &lt;br/&gt;
 &lt;em&gt;Sync the cached root WBC directory $DIR, cleanup the corresponding data on cache&lt;/em&gt;&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;WBC_FLUSH_AGE_LOCK_REVOKE&lt;br/&gt;
 In this flush mode, it will trigger to flush dirty cache in the background periodically when the cache is aged.&lt;br/&gt;
 The WBC EX locks are dropped level by level during flushing.&lt;br/&gt;
 Hold the root WBC EX lock until:
	&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
		&lt;li&gt;Push all its children directories or files to MDT;&lt;/li&gt;
		&lt;li&gt;Acquire the WBC EX lock back on the next level children directories;&lt;br/&gt;
 And then release the root WBC EX lock;&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;li&gt;WBC_FLUSH_AGE_LOCK_HOLD&lt;br/&gt;
 This flush mode is similar to WBC_FLUSH_AGE_LOCK_REVOKE. Instead, the WBC EX lock for the root WBC directory never drops actively unless it has to in the following cases:
	&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
		&lt;li&gt;The client needs to revoke the cached root WBC EX lock when the directory is Conflict accessing from a remote client or shrink the LRU locks in the client lock namespace;&lt;/li&gt;
		&lt;li&gt;A application or a user wants to cleanup or uncache the cached data on the client manually.&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;WBC_FLUSH_AGE_LOCK_HOLD should be the default flush mode for WBC. It means that when flushing directories or files under the root WBC directory due to cache aged, it does not need to revoke the root WBC EX lock, acquire WBC EX lock back on its children directories level by level; The files or directories under the root WBC directory can directly flush to MDT (marked with Sync(S) state);&lt;/p&gt;


&lt;p&gt; Before the root WBC EX lock is revoked, nearly all operations for the files or directories under the root WBC directory can be executed locally such as open()/close(), getattr(), setattr(), readdir(), read(), write().&lt;br/&gt;
 But unlink() should be handled specially for files marked with Sync(s) state. In the normal mode, it can perform unlink on MDT directly; while in the disconnected mode, it may need to mark this file deleted, and readdir()/lookup() should ignore this file. After the connection recovered, then unlink the file on MDT.&lt;/p&gt;


&lt;p&gt; Or we can do unlink on a already removed directory under the root WBC directory as &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-13044&quot; title=&quot;WBC3: remove the whole subtree on MDT already deleted in the client WBC cache&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-13044&quot;&gt;LU-13044&lt;/a&gt;:WBC: remove the whole subtree on MDT already deleted in the client WBC cache&lt;/p&gt;</description>
                <environment></environment>
        <key id="57479">LU-13021</key>
            <summary>WBC&#65306;different flush modes</summary>
                <type id="7" iconUrl="https://jira.whamcloud.com/images/icons/issuetypes/task_agile.png">Technical task</type>
                            <parent id="51932">LU-10938</parent>
                                    <priority id="4" iconUrl="https://jira.whamcloud.com/images/icons/priorities/minor.svg">Minor</priority>
                        <status id="3" iconUrl="https://jira.whamcloud.com/images/icons/statuses/inprogress.png" description="This issue is being actively worked on at the moment by the assignee.">In Progress</status>
                    <statusCategory id="4" key="indeterminate" colorName="inprogress"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="qian_wc">Qian Yingjin</assignee>
                                    <reporter username="qian_wc">Qian Yingjin</reporter>
                        <labels>
                    </labels>
                <created>Wed, 27 Nov 2019 06:58:20 +0000</created>
                <updated>Mon, 10 Jan 2022 01:17:57 +0000</updated>
                                                                                <due></due>
                            <votes>0</votes>
                                    <watches>4</watches>
                                                                            <comments>
                            <comment id="259163" author="adilger" created="Wed, 4 Dec 2019 16:20:37 +0000"  >&lt;p&gt;I would think that &lt;tt&gt;WBC_FLUSH_LAZY&lt;/tt&gt; is very unlikely to be used with Lustre. If the application knows that it will create and unlink a whole directory subtree during the job run, and this client is the only one using the subtree, then there is little benefit to putting the files in a shared filesystem. It could instead use tmpfs directly and save the overhead?&lt;/p&gt;</comment>
                            <comment id="259173" author="qian_wc" created="Thu, 5 Dec 2019 01:49:30 +0000"  >&lt;p&gt;agree.&lt;/p&gt;

&lt;p&gt;However, WBC_FLUSH_LAZY is origin from the base patches of Oleg. Three flush modes are derived from the same origin. It would better to implement them step by step.&lt;/p&gt;

&lt;p&gt;And moreover, we may want to compare the performance between WBC with the lazy mode and tmpfs when there is no limits on the memory usage for improvement WBC. Aged flushing may have some impact on the comparison.&lt;/p&gt;</comment>
                            <comment id="260558" author="gerrit" created="Fri, 3 Jan 2020 16:09:36 +0000"  >&lt;p&gt;Yingjin Qian (qian@ddn.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/37137&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/37137&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-13021&quot; title=&quot;WBC&#65306;different flush modes&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-13021&quot;&gt;LU-13021&lt;/a&gt; wbc: add aging keep cache flush mode for WBC&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: dd8c00c04b851100aff84b4064216883e59a7c68&lt;/p&gt;</comment>
                            <comment id="260609" author="gerrit" created="Sun, 5 Jan 2020 07:18:53 +0000"  >&lt;p&gt;Yingjin Qian (qian@ddn.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/37142&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/37142&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-13021&quot; title=&quot;WBC&#65306;different flush modes&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-13021&quot;&gt;LU-13021&lt;/a&gt; wbc: shrink WBC cached files during umount&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: daa787e64645fab5797a00543429d7148dad2ee1&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                                        </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|i00q1j:</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>