<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:53:35 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-12550] automatic lockahead</title>
                <link>https://jira.whamcloud.com/browse/LU-12550</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;This is something Li Xi suggested a few years ago - It should be possible to do lockahead automatically by tracking the write pattern (like &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-12468&quot; title=&quot;Add writeahead state tracking&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-12468&quot;&gt;LU-12468&lt;/a&gt;) and using server-side contention checking to tell the client when to do this.&#160; (Lockahead is currently only usable by clients which know to ask for it.)&lt;/p&gt;

&lt;p&gt;This should let clients get good performance when strided writes with non-stripe aligned i/o, as long as the i/o is page aligned (LDLM &amp;amp; OSC locks are at page granularity).&lt;/p&gt;</description>
                <environment></environment>
        <key id="56411">LU-12550</key>
            <summary>automatic lockahead</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="paf0186">Patrick Farrell</assignee>
                                    <reporter username="pfarrell">Patrick Farrell</reporter>
                        <labels>
                    </labels>
                <created>Mon, 15 Jul 2019 20:17:50 +0000</created>
                <updated>Fri, 1 Sep 2023 00:53:58 +0000</updated>
                                                                                <due></due>
                            <votes>0</votes>
                                    <watches>6</watches>
                                                                            <comments>
                            <comment id="251435" author="pfarrell" created="Mon, 15 Jul 2019 20:18:01 +0000"  >&lt;p&gt;This is just a side project right now, but I have a quick prototype, and wanted to get it in git.&lt;/p&gt;</comment>
                            <comment id="251436" author="gerrit" created="Mon, 15 Jul 2019 20:25:39 +0000"  >&lt;p&gt;&lt;del&gt;Patrick Farrell (pfarrell@whamcloud.com) uploaded a new patch:&lt;/del&gt; &lt;a href=&quot;https://review.whamcloud.com/35526&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/35526&lt;/a&gt;&lt;br/&gt;
&lt;del&gt;Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-12550&quot; title=&quot;automatic lockahead&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-12550&quot;&gt;LU-12550&lt;/a&gt; llite: Automatic lockahead&lt;/del&gt;&lt;br/&gt;
&lt;del&gt;Project: fs/lustre-release&lt;/del&gt;&lt;br/&gt;
&lt;del&gt;Branch: master&lt;/del&gt;&lt;br/&gt;
&lt;del&gt;Current Patch Set: 1&lt;/del&gt;&lt;br/&gt;
&lt;del&gt;Commit: b87252145170765ad40dfd390d7497f366eae171&lt;/del&gt;&lt;/p&gt;</comment>
                            <comment id="280307" author="adilger" created="Tue, 22 Sep 2020 23:55:36 +0000"  >&lt;p&gt;Instead of doing lockahead for small unaligned writes, I think it is probably better to just do lockless &quot;direct&quot; writes to the OST.  That avoids the overhead of the &lt;tt&gt;LDLM_ENQUEUE&lt;/tt&gt; RPC to lockahead the lock, when we &lt;em&gt;still&lt;/em&gt; need to do the write from the client.&lt;/p&gt;

&lt;p&gt;Even if the lockahead was expanded to cover whole pages (risking some lock contention on the hopes that sparse random writers will have few conflicts), unaligned writes would have to do read-modify-write of the partial pages.  That means at least 3 RPCs (&lt;tt&gt;LDLM_ENQUEUE&lt;/tt&gt; for lockahead, &lt;tt&gt;OST_READ&lt;/tt&gt; of the start/end page(s), and the &lt;tt&gt;OST_WRITE&lt;/tt&gt;), but up to 6 (if separate &lt;tt&gt;OST_READ&lt;/tt&gt; RPCs are sent for the start/end pages, &lt;tt&gt;LDLM_BL_CALLBACK&lt;/tt&gt; if there is a conflict for the expanded lock region, and &lt;tt&gt;LDLM_CANCEL&lt;/tt&gt; if the lock can&apos;t be cancelled with ELC on the &lt;tt&gt;OST_WRITE&lt;/tt&gt;).&lt;/p&gt;

&lt;p&gt;Conversely, lockless writes would only be one &lt;tt&gt;OST_WRITE&lt;/tt&gt; RPC, and may even avoid the RDMA round-trip if it is a short write that fits into the RPC request (though that is not different than the &lt;tt&gt;OST_WRITE&lt;/tt&gt; for the locked write).&lt;/p&gt;</comment>
                            <comment id="306747" author="paf0186" created="Fri, 9 Jul 2021 20:10:31 +0000"  >&lt;p&gt;As Andreas said above, the scope for automatic lockahead is pretty limited and I have no intention of reviving this work.&lt;/p&gt;

&lt;p&gt;However, the contention detection patch here:&lt;br/&gt;
&lt;a href=&quot;https://review.whamcloud.com/#/c/35287/6&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/#/c/35287/6&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Can be extracted from the writeahead tracking &amp;amp; automatic lockahead patches and used for switching from buffered i/o (which cannot be lockless) to direct i/o (which can be lockless).&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                        <issuelink>
            <issuekey id="60017">LU-13802</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="60032">LU-13805</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="55927">LU-12426</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="56080">LU-12468</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="76822">LU-16939</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="76999">LU-16964</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|i00jon:</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>