<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 03:12:50 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-14793] HSM: record the index when scan HSM action llog for new HSM requests</title>
                <link>https://jira.whamcloud.com/browse/LU-14793</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;After analyze online for HSM workload, we found the following contention between HSM archive request and hsm_cdtr thread:&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;
hsm_archive:
  mdt_hsm_add_actions
  mdt_hsm_register_hal
  mdt_agent_record_add
    down_write(&amp;amp;cdt-&amp;gt;cdt_llog_lock);
    llog_cat_add()
    up_write(&amp;amp;cdt-&amp;gt;cdt_llog_lock);


&lt;span class=&quot;code-comment&quot;&gt;// hsm_cdtr kernel daemon thread:
&lt;/span&gt;mdt_coordinator()
  cdt_llog_process(mti-&amp;gt;mti_env, mdt, mdt_coordinator_cb,
				      &amp;amp;hsd, 0, 0, WRITE);
    down_write(&amp;amp;cdt-&amp;gt;cdt_llog_lock);
    llog_cat_process
    up_write(&amp;amp;cdt-&amp;gt;cdt_llog_lock);

# top
PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
 7675 root      20   0       0      0      0 R 100.0  0.0   8729:13 hsm_cdtr
    1 root      20   0   53984   6232   2604 S   0.0  0.0   3:17.86 systemd
    2 root      20   0       0      0      0 S   0.0  0.0   0:00.62 kthreadd
    4 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 kworker/0:0H
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;


&lt;p&gt;HSM archive and kernel thread hsm_cdtr are both contented for cdt-&amp;gt;cdt_llog_lock to add or update the hsm_action llog.&lt;/p&gt;

&lt;p&gt;The testing is use max_requests = 10000:&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;
mdt.isg-tiny-MDT0000.hsm.max_requests=10000
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;It means &quot;hsm_cdtr&quot; kernel thread will scan 10000 llog actions with write lock held in the whole processing, reduce the max_requests to a small value (i.e. 256) should be mitigate the problem. Or we can release the write lock when scan certain number of hsm actions (128) in llog, resched and then re-acquire the write lock to go on scanning the hsm action llog. &lt;/p&gt;

&lt;p&gt;And also when &quot;hsm_cdtr&quot; scan the hsm_action llog, we should record the latest cookie that has been handled, next scanning should be started from the previous end position .&lt;/p&gt;</description>
                <environment></environment>
        <key id="64861">LU-14793</key>
            <summary>HSM: record the index when scan HSM action llog for new HSM requests</summary>
                <type id="1" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11303&amp;avatarType=issuetype">Bug</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="qian_wc">Qian Yingjin</assignee>
                                    <reporter username="qian_wc">Qian Yingjin</reporter>
                        <labels>
                    </labels>
                <created>Fri, 25 Jun 2021 08:20:53 +0000</created>
                <updated>Fri, 14 Jan 2022 06:07:30 +0000</updated>
                            <resolved>Sat, 20 Nov 2021 15:22:44 +0000</resolved>
                                                    <fixVersion>Lustre 2.15.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>6</watches>
                                                                            <comments>
                            <comment id="305507" author="gerrit" created="Fri, 25 Jun 2021 08:51:44 +0000"  >&lt;p&gt;Yingjin Qian (qian@ddn.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/44077&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/44077&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-14793&quot; title=&quot;HSM: record the index when scan HSM action llog for new HSM requests&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-14793&quot;&gt;&lt;del&gt;LU-14793&lt;/del&gt;&lt;/a&gt; hsm: record index for further HSM action scanning&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 1238bf2e3a1f29cf9eb7d1af3610a709fbce3865&lt;/p&gt;</comment>
                            <comment id="318733" author="gerrit" created="Sat, 20 Nov 2021 06:25:16 +0000"  >&lt;p&gt;&quot;Oleg Drokin &amp;lt;green@whamcloud.com&amp;gt;&quot; merged in patch &lt;a href=&quot;https://review.whamcloud.com/44077/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/44077/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-14793&quot; title=&quot;HSM: record the index when scan HSM action llog for new HSM requests&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-14793&quot;&gt;&lt;del&gt;LU-14793&lt;/del&gt;&lt;/a&gt; hsm: record index for further HSM action scanning&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: a15a5432f8063e3a04a87d74eafac0060a8f9d26&lt;/p&gt;</comment>
                            <comment id="318800" author="pjones" created="Sat, 20 Nov 2021 15:22:44 +0000"  >&lt;p&gt;Landed for 2.15&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                        <issuelink>
            <issuekey id="59606">LU-13689</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="59489">LU-13651</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <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|i01xqv:</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>
                                                                                            <customfield id="customfield_10060" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Severity</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10022"><![CDATA[3]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        </customfields>
    </item>
</channel>
</rss>