<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 03:26:09 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-16338] read-ahead more than file size for a small file</title>
                <link>https://jira.whamcloud.com/browse/LU-16338</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;The following scripts will read pages more than file size:&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;
test_907()
{
        local file=$DIR/$tfile

        $LCTL set_param -n llite.*.read_ahead_stats=0
        fallocate -l 16K $file || error &lt;span class=&quot;code-quote&quot;&gt;&quot;failed to fallocate $file&quot;&lt;/span&gt;
        cancel_lru_locks osc
        #dd &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt;=$file of=/dev/&lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt; bs=1M
        $MULTIOP $file or1048576c
        $LCTL get_param llite.*.read_ahead_stats
}
run_test 907 &lt;span class=&quot;code-quote&quot;&gt;&quot;read ahaed &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; small file&quot;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The readahead page stats are as follows:&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;
== sanity test 907: read ahaed &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; small file ============ 04:38:01 (1669196281)
&lt;span class=&quot;code-object&quot;&gt;short&lt;/span&gt; read: 16384/1048576
&lt;span class=&quot;code-object&quot;&gt;short&lt;/span&gt; read: 0/1032192
llite.lustre-ffff938b7849d000.read_ahead_stats=
snapshot_time             4011.320890492 secs.nsecs
start_time                0.000000000 secs.nsecs
elapsed_time              4011.320890492 secs.nsecs
hits                      4 samples [pages]
misses                    1 samples [pages]
zero_size_window          4 samples [pages]
failed_to_reach_end       1 samples [pages]
failed_to_fast_read       1 samples [pages]
readahead_pages           1 samples [pages] 255 255 255
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;For small files, the read-ahead pages reach 255, it is not reasonable...&lt;/p&gt;</description>
                <environment></environment>
        <key id="73370">LU-16338</key>
            <summary>read-ahead more than file size for a small file</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="qian_wc">Qian Yingjin</assignee>
                                    <reporter username="qian_wc">Qian Yingjin</reporter>
                        <labels>
                    </labels>
                <created>Wed, 23 Nov 2022 09:41:46 +0000</created>
                <updated>Tue, 25 Apr 2023 03:46:12 +0000</updated>
                                                                                <due></due>
                            <votes>0</votes>
                                    <watches>4</watches>
                                                                            <comments>
                            <comment id="353937" author="gerrit" created="Wed, 23 Nov 2022 09:46:05 +0000"  >&lt;p&gt;&quot;Qian Yingjin &amp;lt;qian@ddn.com&amp;gt;&quot; uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/c/fs/lustre-release/+/49224&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/fs/lustre-release/+/49224&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-16338&quot; title=&quot;read-ahead more than file size for a small file&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-16338&quot;&gt;LU-16338&lt;/a&gt; readahead: add stats for read-ahead page count&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 34779e7c2f51d93e190c863682c79ecd0060b06c&lt;/p&gt;</comment>
                            <comment id="353960" author="gerrit" created="Wed, 23 Nov 2022 13:17:19 +0000"  >&lt;p&gt;&quot;Qian Yingjin &amp;lt;qian@ddn.com&amp;gt;&quot; uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/c/fs/lustre-release/+/49226&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/fs/lustre-release/+/49226&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-16338&quot; title=&quot;read-ahead more than file size for a small file&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-16338&quot;&gt;LU-16338&lt;/a&gt; readahead: clip readahead with kms&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 9404bfb6f825c28d692d9c833ccd2137c46a84d3&lt;/p&gt;</comment>
                            <comment id="354169" author="qian_wc" created="Fri, 25 Nov 2022 12:05:44 +0000"  >&lt;p&gt;our read-ahead mechanism is much radical.&lt;br/&gt;
And there is some logic unreasonable in the read-ahed code path.&lt;br/&gt;
In @ll_readahead(), it already clips the readahead end index with the kms, but in the following @ll_read_ahead_pages(), it increases the end index to align with optimal RPC size and @ria-&amp;gt;ria_end_idx_min.&lt;/p&gt;

&lt;p&gt;One solution for this problem is not to increase the end index larger than kms in llite layer.&lt;br/&gt;
Another solution is the patch above: clip the returned readahead range with Kim in OSC layer.&lt;/p&gt;</comment>
                            <comment id="359433" author="paf0186" created="Wed, 18 Jan 2023 05:13:22 +0000"  >&lt;p&gt;I think the logic at the top level is a bit weird - I have mixed feelings about it - but I think you have the right idea about clipping at the OSC layer.&#160; Even if we change the higher level logic, clipping at the OSC layer seems like a good idea to me.&lt;/p&gt;</comment>
                            <comment id="360572" author="gerrit" created="Fri, 27 Jan 2023 00:34:32 +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/c/fs/lustre-release/+/49224/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/fs/lustre-release/+/49224/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-16338&quot; title=&quot;read-ahead more than file size for a small file&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-16338&quot;&gt;LU-16338&lt;/a&gt; readahead: add stats for read-ahead page count&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: cdcf97e17e73dfdd65c4e46bb30c4a07f5e710cf&lt;/p&gt;</comment>
                            <comment id="363190" author="qian_wc" created="Fri, 17 Feb 2023 07:43:07 +0000"  >&lt;p&gt;For a single-stripe file, after applied &lt;a href=&quot;https://review.whamcloud.com/c/fs/lustre-release/+/49226&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/fs/lustre-release/+/49226&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-16338&quot; title=&quot;read-ahead more than file size for a small file&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-16338&quot;&gt;LU-16338&lt;/a&gt; readahead: clip readahead with kms,&lt;br/&gt;
It cause a dead loop:&lt;br/&gt;
&lt;a href=&quot;https://testing.whamcloud.com/test_logs/8d73c4e7-0e6e-482c-b93c-bf7159706890/show_text&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://testing.whamcloud.com/test_logs/8d73c4e7-0e6e-482c-b93c-bf7159706890/show_text&lt;/a&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;
00000080:00200000:1.0:1676614736.277040:0:21215:0:(rw.c:1981:ll_readpage()) pgno:260, cnt:1032192, pos:0
00000080:00000001:1.0:1676614736.277041:0:21215:0:(vvp_io.c:1654:vvp_io_read_ahead()) &lt;span class=&quot;code-object&quot;&gt;Process&lt;/span&gt; entered
00000080:00000001:1.0:1676614736.277041:0:21215:0:(vvp_io.c:1666:vvp_io_read_ahead()) &lt;span class=&quot;code-object&quot;&gt;Process&lt;/span&gt; leaving (rc=0 : 0 : 0)
00000008:00000001:1.0:1676614736.277042:0:21215:0:(osc_io.c:83:osc_io_read_ahead()) &lt;span class=&quot;code-object&quot;&gt;Process&lt;/span&gt; entered
00000008:00000001:1.0:1676614736.277042:0:21215:0:(osc_lock.c:1281:osc_obj_dlmlock_at_pgoff()) &lt;span class=&quot;code-object&quot;&gt;Process&lt;/span&gt; entered
00000008:00000001:1.0:1676614736.277043:0:21215:0:(osc_request.c:3137:osc_match_base()) &lt;span class=&quot;code-object&quot;&gt;Process&lt;/span&gt; entered
00000008:00000001:1.0:1676614736.277043:0:21215:0:(osc_request.c:3172:osc_match_base()) &lt;span class=&quot;code-object&quot;&gt;Process&lt;/span&gt; leaving (rc=4 : 4 : 4)
00000008:00000001:1.0:1676614736.277044:0:21215:0:(osc_lock.c:1315:osc_obj_dlmlock_at_pgoff()) &lt;span class=&quot;code-object&quot;&gt;Process&lt;/span&gt; leaving (rc=18446620395345229440 : -123678364322176 : ffff8f83e3073680)
00000008:00000001:1.0:1676614736.277045:0:21215:0:(osc_io.c:112:osc_io_read_ahead()) &lt;span class=&quot;code-object&quot;&gt;Process&lt;/span&gt; leaving (rc=0 : 0 : 0)
00000080:00000001:1.0:1676614736.277045:0:21215:0:(rw.c:2012:ll_readpage()) &lt;span class=&quot;code-object&quot;&gt;Process&lt;/span&gt; leaving (rc=524289 : 524289 : 80001)
00000080:00000001:1.0:1676614736.277046:0:21215:0:(rw.c:1873:ll_readpage()) &lt;span class=&quot;code-object&quot;&gt;Process&lt;/span&gt; entered
00000080:00200000:1.0:1676614736.277046:0:21215:0:(rw.c:1981:ll_readpage()) pgno:260, cnt:1032192, pos:0
00000080:00000001:1.0:1676614736.277047:0:21215:0:(vvp_io.c:1654:vvp_io_read_ahead()) &lt;span class=&quot;code-object&quot;&gt;Process&lt;/span&gt; entered
00000080:00000001:1.0:1676614736.277047:0:21215:0:(vvp_io.c:1666:vvp_io_read_ahead()) &lt;span class=&quot;code-object&quot;&gt;Process&lt;/span&gt; leaving (rc=0 : 0 : 0)
00000008:00000001:1.0:1676614736.277048:0:21215:0:(osc_io.c:83:osc_io_read_ahead()) &lt;span class=&quot;code-object&quot;&gt;Process&lt;/span&gt; entered
00000008:00000001:1.0:1676614736.277048:0:21215:0:(osc_lock.c:1281:osc_obj_dlmlock_at_pgoff()) &lt;span class=&quot;code-object&quot;&gt;Process&lt;/span&gt; entered
00000008:00000001:1.0:1676614736.277049:0:21215:0:(osc_request.c:3137:osc_match_base()) &lt;span class=&quot;code-object&quot;&gt;Process&lt;/span&gt; entered
00000008:00000001:1.0:1676614736.277049:0:21215:0:(osc_request.c:3172:osc_match_base()) &lt;span class=&quot;code-object&quot;&gt;Process&lt;/span&gt; leaving (rc=4 : 4 : 4)
00000008:00000001:1.0:1676614736.277050:0:21215:0:(osc_lock.c:1315:osc_obj_dlmlock_at_pgoff()) &lt;span class=&quot;code-object&quot;&gt;Process&lt;/span&gt; leaving (rc=18446620395345229440 : -123678364322176 : ffff8f83e3073680)
00000008:00000001:1.0:1676614736.277051:0:21215:0:(osc_io.c:112:osc_io_read_ahead()) &lt;span class=&quot;code-object&quot;&gt;Process&lt;/span&gt; leaving (rc=0 : 0 : 0)
00000080:00000001:1.0:1676614736.277051:0:21215:0:(rw.c:2012:ll_readpage()) &lt;span class=&quot;code-object&quot;&gt;Process&lt;/span&gt; leaving (rc=524289 : 524289 : 80001)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The dead loop code lines:&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;
&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (cl_offset(clob, vmpage-&amp;gt;index) &amp;gt;= iter-&amp;gt;count + iocb-&amp;gt;ki_pos) {
                        result = cl_io_read_ahead(env, io, vmpage-&amp;gt;index, &amp;amp;ra);
                        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (result &amp;lt; 0 || vmpage-&amp;gt;index &amp;gt; ra.cra_end_idx) {
                                cl_read_ahead_release(env, &amp;amp;ra);
                                unlock_page(vmpage);
                                RETURN(AOP_TRUNCATED_PAGE); ===&amp;gt;AOP_TRUNCATED_PAGE = 80001
                        }
                }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I will investigate whether this bug existed without the patch.&lt;/p&gt;</comment>
                            <comment id="367631" author="gerrit" created="Tue, 28 Mar 2023 22:14:08 +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/c/fs/lustre-release/+/49226/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/fs/lustre-release/+/49226/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-16338&quot; title=&quot;read-ahead more than file size for a small file&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-16338&quot;&gt;LU-16338&lt;/a&gt; readahead: clip readahead with kms&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: b33808d3aebb06cf0660baee1186b2f944d9d06d&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="74744">LU-16579</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|i036ef:</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>