<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:24:23 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-9232] Reduce osd-ldiskfs page lock hold time for read</title>
                <link>https://jira.whamcloud.com/browse/LU-9232</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;It seems that there is spinlock contention in osd_get_bufs-&amp;gt;osd_get_page-&amp;gt;find_or_create_page(), when many threads are reading the same offset of one object (executable load from Lustre) and I&apos;m wondering if we can optimize this somehow? &lt;/p&gt;

&lt;p&gt;Firstly, we should consider fetching multiple pages at one time. That will reduce locking on the address space and hopefully make page lookup more efficient. One option is to use mapping-&amp;gt;readpages() (used to be mpage_readpages() but has changed to ext4_mpage_readpages() in newer kernels to handle encrypted files), or fop-&amp;gt;read_iter() (ext4_file_read_iter(), need to make a fake file struct with f_mapping set, and set O_NOATIME and disable readahead to avoid a messy callpath in the VFS) and just convert the niobuf to an iov directly. This has the possibility of removing a lot of code from osd-ldiskfs that was created before ext4 used bio-based read/write.&lt;/p&gt;

&lt;p&gt;The other potential major win is if we had a fast path for reads where all of the pages are already in cache, so we don&apos;t have to hold the page locks over the whole RPC, blocking the other threads from accessing the same data? Using find_get_page() appears to avoid the page lock completely, since it is only needed when reading the page from disk? In the case of a fully cached object, we could avoid all contention. We would only fall back to locking the page if actual disk IO is needed. This is largely already encapsulated in the VFS/MM read path, so if we could use that it would save a lot of complexity.&lt;/p&gt;

&lt;p&gt;The current page locking was done for simplicity mostly - so that we unlock pages unconditionally in osd_bufs_put(). It should be possible to unlock uptodate pages in osd_read_prep() and fix osd_bufs_put() to skip unlock if it&apos;s called with rw=0.  Something similar was done in Lustre 1.8 to drop page locks on read. &lt;/p&gt;</description>
                <environment></environment>
        <key id="44881">LU-9232</key>
            <summary>Reduce osd-ldiskfs page lock hold time for read</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="3">Duplicate</resolution>
                                        <assignee username="wc-triage">WC Triage</assignee>
                                    <reporter username="adilger">Andreas Dilger</reporter>
                        <labels>
                    </labels>
                <created>Mon, 20 Mar 2017 17:43:56 +0000</created>
                <updated>Thu, 11 Jun 2020 09:23:31 +0000</updated>
                            <resolved>Thu, 11 Jun 2020 09:23:31 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>4</watches>
                                                                            <comments>
                            <comment id="235139" author="adilger" created="Fri, 19 Oct 2018 07:22:53 +0000"  >&lt;p&gt;Alex, thoughts on this in relation to improving random read performance together with ladvise?  That would put all of the pages into OSS RAM, so it would be good to have a fast path for such pages.&lt;/p&gt;</comment>
                            <comment id="235140" author="bzzz" created="Fri, 19 Oct 2018 07:24:14 +0000"  >&lt;p&gt;I&apos;ll try to improve that..&lt;/p&gt;</comment>
                            <comment id="272586" author="adilger" created="Thu, 11 Jun 2020 09:23:11 +0000"  >&lt;p&gt;I believe that this was fixed with patch &lt;a href=&quot;https://review.whamcloud.com/33521&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/33521&lt;/a&gt; &quot;&lt;tt&gt;&lt;a href=&quot;https://jira.whamcloud.com/browse/LU-11221&quot; title=&quot;Do not hold pages locked for network IO on the server.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-11221&quot;&gt;&lt;del&gt;LU-11221&lt;/del&gt;&lt;/a&gt; osd: allow concurrent bulks from pagecache&lt;/tt&gt;&quot;.&lt;/p&gt;
</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="52913">LU-11221</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                                        </outwardlinks>
                                                        </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|hzz7r3:</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>