<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:16:08 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-8276] Make lru clear always discard read lock pages</title>
                <link>https://jira.whamcloud.com/browse/LU-8276</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;A significant amount of time is sometimes spent during&lt;br/&gt;
lru clearing (IE, echo &apos;clear&apos; &amp;gt; lru_size) checking&lt;br/&gt;
pages to see if they are covered by another read lock.&lt;br/&gt;
Since all unused read locks will be destroyed by this&lt;br/&gt;
operation, the pages will be freed momentarily anyway,&lt;br/&gt;
and this is mostly a waste of time.&lt;/p&gt;

&lt;p&gt;(Time is spent specifically in ldlm_lock_match, trying to&lt;br/&gt;
match these locks.)&lt;/p&gt;

&lt;p&gt;So, in the case of echo clear &amp;gt; lru_size, we should not&lt;br/&gt;
check for other covering read locks before attempting to&lt;br/&gt;
discard pages.&lt;/p&gt;

&lt;p&gt;We do this by using the LDLM_FL_DISCARD_DATA flag, which is&lt;br/&gt;
currently used for special cases where you want to destroy&lt;br/&gt;
the dirty pages under a write lock rather than write them&lt;br/&gt;
out.&lt;/p&gt;

&lt;p&gt;We set this flag on all the PR locks which are slated for&lt;br/&gt;
cancellation by ldlm_prepare_lru_list (when it is called&lt;br/&gt;
from ldlm_ns_drop_cache).&lt;/p&gt;

&lt;p&gt;The case where another lock does cover those pages (and is&lt;br/&gt;
in use and so does not get cancelled) is safe for a few&lt;br/&gt;
reasons:&lt;/p&gt;

&lt;p&gt;1. When discarding pages, we wait (discard_cb-&amp;gt;cl_page_own)&lt;br/&gt;
until they are in the cached state before invalidating.&lt;br/&gt;
So if they are actively in use, we&apos;ll wait until that use&lt;br/&gt;
is done.&lt;/p&gt;

&lt;p&gt;2. Removal of pages under a read lock is something that can&lt;br/&gt;
happen due to memory pressure, since these are VFS cache&lt;br/&gt;
pages. If a client reads something which is then removed&lt;br/&gt;
from the cache and goes to read it again, this will simply&lt;br/&gt;
generate a new read request.&lt;/p&gt;

&lt;p&gt;This has a performance cost for that reader, but if anyone&lt;br/&gt;
is clearing the ldlm lru while actively doing I/O in that&lt;br/&gt;
namespace, then they cannot ask for good performance.&lt;/p&gt;

&lt;p&gt;In the case of many read locks on a single resource, this&lt;br/&gt;
improves cleanup time dramatically.  In internal testing at&lt;br/&gt;
Cray using unusual read/write I/O patterns to create&lt;br/&gt;
~80,000 read locks on a single file, this improves cleanup&lt;br/&gt;
time from ~60 seconds to ~0.5 seconds.  This also slightly&lt;br/&gt;
improves cleanup speed in the more normal case of a 1 or&lt;br/&gt;
very few read locks on a file.&lt;/p&gt;</description>
                <environment></environment>
        <key id="37586">LU-8276</key>
            <summary>Make lru clear always discard read lock pages</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="paf">Patrick Farrell</assignee>
                                    <reporter username="paf">Patrick Farrell</reporter>
                        <labels>
                            <label>patch</label>
                    </labels>
                <created>Tue, 14 Jun 2016 18:11:37 +0000</created>
                <updated>Tue, 24 Oct 2017 21:39:41 +0000</updated>
                            <resolved>Mon, 28 Aug 2017 14:54:51 +0000</resolved>
                                                    <fixVersion>Lustre 2.11.0</fixVersion>
                    <fixVersion>Lustre 2.10.2</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>4</watches>
                                                                            <comments>
                            <comment id="155691" author="gerrit" created="Tue, 14 Jun 2016 18:46:17 +0000"  >&lt;p&gt;Patrick Farrell (paf@cray.com) uploaded a new patch: &lt;a href=&quot;http://review.whamcloud.com/20785&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/20785&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-8276&quot; title=&quot;Make lru clear always discard read lock pages&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-8276&quot;&gt;&lt;del&gt;LU-8276&lt;/del&gt;&lt;/a&gt; ldlm: Make lru clear always discard read lock pages&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 2c274dacff16370b5fc0b4d587ead14afcc6c17a&lt;/p&gt;</comment>
                            <comment id="206548" author="gerrit" created="Mon, 28 Aug 2017 06:26:23 +0000"  >&lt;p&gt;Oleg Drokin (oleg.drokin@intel.com) merged in patch &lt;a href=&quot;https://review.whamcloud.com/20785/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/20785/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-8276&quot; title=&quot;Make lru clear always discard read lock pages&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-8276&quot;&gt;&lt;del&gt;LU-8276&lt;/del&gt;&lt;/a&gt; ldlm: Make lru clear always discard read lock pages&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 6a369b59f3729513dd8e81c4964dc6183287b601&lt;/p&gt;</comment>
                            <comment id="206610" author="pjones" created="Mon, 28 Aug 2017 14:54:51 +0000"  >&lt;p&gt;Landed for 2.11&lt;/p&gt;</comment>
                            <comment id="209959" author="gerrit" created="Fri, 29 Sep 2017 16:08:22 +0000"  >&lt;p&gt;Minh Diep (minh.diep@intel.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/29264&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/29264&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-8276&quot; title=&quot;Make lru clear always discard read lock pages&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-8276&quot;&gt;&lt;del&gt;LU-8276&lt;/del&gt;&lt;/a&gt; ldlm: Make lru clear always discard read lock pages&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: b2_10&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: c2f5f56a9e90146cf82b09729c47c1e3c1f3eb7b&lt;/p&gt;</comment>
                            <comment id="209970" author="paf" created="Fri, 29 Sep 2017 16:45:06 +0000"  >&lt;p&gt;Minh,&lt;/p&gt;

&lt;p&gt;I&apos;m curious why this one was targeted for stable?  It&apos;s a performance improvement rather than, say, a bug fix.&lt;/p&gt;

&lt;p&gt;Just wondering, thanks.&lt;/p&gt;</comment>
                            <comment id="210189" author="mdiep" created="Tue, 3 Oct 2017 14:57:33 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.whamcloud.com/secure/ViewProfile.jspa?name=paf&quot; class=&quot;user-hover&quot; rel=&quot;paf&quot;&gt;paf&lt;/a&gt;, I believe it&apos;s a dependency for a patch on top (I don&apos;t recall the number). We&apos;ll take another look soon&lt;/p&gt;</comment>
                            <comment id="211871" author="gerrit" created="Tue, 24 Oct 2017 21:22:39 +0000"  >&lt;p&gt;John L. Hammond (john.hammond@intel.com) merged in patch &lt;a href=&quot;https://review.whamcloud.com/29264/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/29264/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-8276&quot; title=&quot;Make lru clear always discard read lock pages&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-8276&quot;&gt;&lt;del&gt;LU-8276&lt;/del&gt;&lt;/a&gt; ldlm: Make lru clear always discard read lock pages&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: b2_10&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: d5c583291498d26f5f5634b8f3463bbfe7109f1e&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="34847">LU-7802</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|hzyemv:</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>