<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 03:27:32 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-16498] change upcall uc_lock to read-write lock</title>
                <link>https://jira.whamcloud.com/browse/LU-16498</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;It would be better to change the upcall cache &lt;tt&gt;uc_lock&lt;/tt&gt; to a read-write lock so that threads can get the read lock to do concurrent lookups in the upcall cache, and only grab the write lock in the rare case when a new entry is added or old entries are expired.  That reduces serialization between MDS threads during normal operation, and avoids all of the threads spinning for some time if the requested key (UID) is not in the cache at all, before they sleep on &lt;tt&gt;uc_wait&lt;/tt&gt;.&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
find_again:
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt;)
                write_lock(&amp;amp;cache-&amp;gt;uc_lock);
        &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt;
                read_lock(&amp;amp;cache-&amp;gt;uc_lock);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Because &lt;tt&gt;check_link_entry()&lt;/tt&gt; is modifying the list, it cannot be done while holding the read lock.  It &lt;em&gt;might&lt;/em&gt; be done in a separate list walk after the upcall is launched before waiting for the cache to be updated.  That is dead time anyway.  However, some care must be taken that the expired list entries are processed properly.  It may be more clear code wise to return from &lt;tt&gt;check_list_entry()&lt;/tt&gt; if there are expired entries and the read lock is held, drop the read lock and get the write lock, and then retry the lookup. That would add some contention if when are expired entries, but for the majority of operations a read lock would be enough.&lt;/p&gt;

&lt;p&gt;The &lt;tt&gt;CERROR()&lt;/tt&gt; call in &lt;tt&gt;upcall_cache_get_entry()&lt;/tt&gt; should be changed to the standard format, with device name (&lt;tt&gt;uc_name&lt;/tt&gt;) at the start of the line and &lt;tt&gt;&quot;: rc = %d\n&quot;&lt;/tt&gt; at the end, along with the &lt;tt&gt;uc_acquire_expire&lt;/tt&gt; interval that was waited.&lt;/p&gt;</description>
                <environment></environment>
        <key id="74136">LU-16498</key>
            <summary>change upcall uc_lock to read-write lock</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="sebastien">Sebastien Buisson</assignee>
                                    <reporter username="adilger">Andreas Dilger</reporter>
                        <labels>
                    </labels>
                <created>Fri, 20 Jan 2023 22:11:55 +0000</created>
                <updated>Sat, 20 Jan 2024 00:30:57 +0000</updated>
                                            <version>Lustre 2.16.0</version>
                    <version>Lustre 2.12.9</version>
                    <version>Lustre 2.15.2</version>
                                                        <due></due>
                            <votes>0</votes>
                                    <watches>3</watches>
                                                                            <comments>
                            <comment id="386177" author="gerrit" created="Fri, 15 Sep 2023 16:35:39 +0000"  >&lt;p&gt;&quot;Sebastien Buisson &amp;lt;sbuisson@ddn.com&amp;gt;&quot; uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/c/fs/lustre-release/+/52395&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/fs/lustre-release/+/52395&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-16498&quot; title=&quot;change upcall uc_lock to read-write lock&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-16498&quot;&gt;LU-16498&lt;/a&gt; obdclass: change uc_lock to rwlock&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: fb9d9b40f979140718799427e6f13234a4cbce80&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                        <issuelink>
            <issuekey id="72393">LU-16165</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="80141">LU-17447</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|i03asf:</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>