<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:54:46 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-12687] Fast ENOSPC on direct I/O</title>
                <link>https://jira.whamcloud.com/browse/LU-12687</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;On direct I/O a client gets substantial amount of grants without consuming them so that direct I/O writes face with ENOSPC long before disk space is over.&lt;br/&gt;
 The below example shows how dd oflag=direct fails to write 400kb to ~70mb ost.&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;[root@sl75master tests]# OSTSIZE=100000 sh llmount.sh
...
Updated after 6s: wanted &apos;procname_uid&apos; got &apos;procname_uid&apos;
disable quota as required
[root@sl75master tests]# lfs df -h
UUID                       bytes        Used   Available Use% Mounted on
lustre-MDT0000_UUID       122.4M        1.9M      109.5M   2% /mnt/lustre[MDT:0]
lustre-OST0000_UUID        69.4M        1.2M       61.4M   2% /mnt/lustre[OST:0]
lustre-OST0001_UUID        69.4M        1.2M       61.4M   2% /mnt/lustre[OST:1]

filesystem_summary:       138.9M        2.5M      122.7M   2% /mnt/lustre

[root@sl75master tests]# dd if=/dev/zero of=/mnt/lustre/file bs=4k count=100 oflag=direct
dd: error writing &#8216;/mnt/lustre/file&#8217;: No space left on device
54+0 records in
53+0 records out
217088 bytes (217 kB) copied, 0.138233 s, 1.6 MB/s
[root@sl75master tests]# 
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
        <key id="56732">LU-12687</key>
            <summary>Fast ENOSPC on direct I/O</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="vsaveliev">Vladimir Saveliev</assignee>
                                    <reporter username="vsaveliev">Vladimir Saveliev</reporter>
                        <labels>
                    </labels>
                <created>Fri, 23 Aug 2019 10:45:44 +0000</created>
                <updated>Thu, 7 Apr 2022 15:57:27 +0000</updated>
                            <resolved>Thu, 24 Sep 2020 13:45:09 +0000</resolved>
                                                    <fixVersion>Lustre 2.14.0</fixVersion>
                    <fixVersion>Lustre 2.12.6</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>10</watches>
                                                                            <comments>
                            <comment id="253491" author="gerrit" created="Fri, 23 Aug 2019 10:47:08 +0000"  >&lt;p&gt;Vladimir Saveliev (c17830@cray.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/35896&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/35896&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-12687&quot; title=&quot;Fast ENOSPC on direct I/O&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-12687&quot;&gt;&lt;del&gt;LU-12687&lt;/del&gt;&lt;/a&gt; osc: consume grants for direct I/O&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 9492bed7688f492c756901c9c357dbacbace4485&lt;/p&gt;</comment>
                            <comment id="253507" author="pfarrell" created="Fri, 23 Aug 2019 14:17:56 +0000"  >&lt;p&gt;Vladimir,&lt;/p&gt;

&lt;p&gt;This is a dupe of&#160;&lt;a href=&quot;https://jira.whamcloud.com/browse/LU-4664&quot; title=&quot;sync write should consume grant on client&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-4664&quot;&gt;&lt;del&gt;LU-4664&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We have a patch in work there - In fact, I think it&apos;s ready except for fixing the test.&lt;/p&gt;

&lt;p&gt;I think having direct i/o consume grants &lt;b&gt;correctly&lt;/b&gt; rather than not using grant at all is our preferred solution, and that&apos;s what &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-4664&quot; title=&quot;sync write should consume grant on client&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-4664&quot;&gt;&lt;del&gt;LU-4664&lt;/del&gt;&lt;/a&gt; implements.&#160; Is there a specific reason why direct i/o should not request grant, rather than fixing the consume side as in &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-4664&quot; title=&quot;sync write should consume grant on client&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-4664&quot;&gt;&lt;del&gt;LU-4664&lt;/del&gt;&lt;/a&gt;?&lt;/p&gt;</comment>
                            <comment id="253508" author="pfarrell" created="Fri, 23 Aug 2019 14:18:21 +0000"  >&lt;p&gt;Sorry, patch is:&lt;br/&gt;
&lt;a href=&quot;https://review.whamcloud.com/#/c/9454/26&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/#/c/9454/&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="254247" author="adilger" created="Fri, 6 Sep 2019 04:45:15 +0000"  >&lt;p&gt;I agree with Patrick here that the &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-4664&quot; title=&quot;sync write should consume grant on client&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-4664&quot;&gt;&lt;del&gt;LU-4664&lt;/del&gt;&lt;/a&gt; patch is the right way to go.  If we don&apos;t consume grants on &lt;tt&gt;O_DIRECT&lt;/tt&gt; writes, then it is possible for those writes to run out of space when there is still grant available on the client.  &lt;/p&gt;

&lt;p&gt;Conversely, if &lt;tt&gt;O_DIRECT&lt;/tt&gt; consumes all of the grant, but doesn&apos;t request more (as with the patch here) then if there are cached writes after this it will not have any grant and will start with small (&lt;tt&gt;PAGE_SIZE&lt;/tt&gt;) synchronous writes until it has some grant.&lt;/p&gt;

&lt;p&gt;It would be great if that patch could be refreshed and landed.&lt;/p&gt;</comment>
                            <comment id="261866" author="bzzz" created="Mon, 27 Jan 2020 09:54:27 +0000"  >&lt;p&gt;I&apos;m hitting this almost every run of sanity.sh in 248b&lt;/p&gt;</comment>
                            <comment id="274845" author="adilger" created="Thu, 9 Jul 2020 07:34:25 +0000"  >&lt;p&gt;Alex, if you are able to reproduce this easily, could you please verify patch &lt;a href=&quot;https://review.whamcloud.com/35896&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/35896&lt;/a&gt; &quot;&lt;tt&gt;&lt;a href=&quot;https://jira.whamcloud.com/browse/LU-12687&quot; title=&quot;Fast ENOSPC on direct I/O&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-12687&quot;&gt;&lt;del&gt;LU-12687&lt;/del&gt;&lt;/a&gt; osc: consume grants for direct I/O&lt;/tt&gt;&quot; fixes it for you?  That is about to land.&lt;/p&gt;</comment>
                            <comment id="274999" author="gerrit" created="Fri, 10 Jul 2020 16:52:19 +0000"  >&lt;p&gt;Oleg Drokin (green@whamcloud.com) merged in patch &lt;a href=&quot;https://review.whamcloud.com/35896/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/35896/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-12687&quot; title=&quot;Fast ENOSPC on direct I/O&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-12687&quot;&gt;&lt;del&gt;LU-12687&lt;/del&gt;&lt;/a&gt; osc: consume grants for direct I/O&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 05f326a7988a7a0d6954d1b0d318315526209ae6&lt;/p&gt;</comment>
                            <comment id="275173" author="pjones" created="Sat, 11 Jul 2020 15:59:27 +0000"  >&lt;p&gt;Landed for 2.14&lt;/p&gt;</comment>
                            <comment id="275461" author="gerrit" created="Wed, 15 Jul 2020 09:10:19 +0000"  >&lt;p&gt;Mike Pershin (mpershin@whamcloud.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/39386&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/39386&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-12687&quot; title=&quot;Fast ENOSPC on direct I/O&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-12687&quot;&gt;&lt;del&gt;LU-12687&lt;/del&gt;&lt;/a&gt; osc: consume grants for direct I/O&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: b2_12&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: c89c8423cf730df97ddc19a8981f978c79fabdfa&lt;/p&gt;</comment>
                            <comment id="276188" author="gerrit" created="Tue, 28 Jul 2020 04:48:21 +0000"  >&lt;p&gt;&lt;del&gt;Olaf Faaland-LLNL (faaland1@llnl.gov) uploaded a new patch:&lt;/del&gt; &lt;a href=&quot;https://review.whamcloud.com/39517&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/39517&lt;/a&gt;&lt;br/&gt;
 &lt;del&gt;Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-12687&quot; title=&quot;Fast ENOSPC on direct I/O&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-12687&quot;&gt;&lt;del&gt;LU-12687&lt;/del&gt;&lt;/a&gt; canary: comment-only change&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: bcec79eb40dda0c26bffb9ec950a142034866df6&lt;/del&gt;&lt;/p&gt;</comment>
                            <comment id="278348" author="tappro" created="Sun, 30 Aug 2020 09:25:31 +0000"  >&lt;p&gt;Regarding landed patch&#160;&lt;a href=&quot;https://review.whamcloud.com/35896/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/35896/&lt;/a&gt; - I&apos;ve noted that added code does pretty the same as &lt;tt&gt;osc_enter_cache_try()&lt;/tt&gt; but skips the following checks:&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; (cli-&amp;gt;cl_dirty_pages &amp;lt; cli-&amp;gt;cl_dirty_max_pages) {
		&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (atomic_long_add_return(1, &amp;amp;obd_dirty_pages) &amp;lt;=
		    obd_max_dirty_pages) {
                    ...
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;for &lt;tt&gt;cl_dirty_max_pages&lt;/tt&gt; limit. Instead of that we just consuming write grants always. Was that intentional or the same limits check should be added for DIO case too?&lt;/p&gt;</comment>
                            <comment id="278349" author="tappro" created="Sun, 30 Aug 2020 09:27:43 +0000"  >&lt;p&gt;Vladimir, Andreas, I reopened this due to question I have about already landed patch, please check my previous comment.&lt;/p&gt;</comment>
                            <comment id="278407" author="adilger" created="Mon, 31 Aug 2020 18:59:41 +0000"  >&lt;p&gt;Hi Mike, I don&apos;t &lt;em&gt;think&lt;/em&gt; that the max_dirty_pages limit applies in the case of &lt;tt&gt;O_DIRECT&lt;/tt&gt; writes, because the client is not caching those pages locally.  It is immediately sending the pages for write to the OST, so it doesn&apos;t actually &lt;em&gt;need&lt;/em&gt; the grant or to check the dirty limit.  The grant usage is only to prevent clients from holding grant that cannot be used by the &lt;tt&gt;O_DIRECT&lt;/tt&gt; writes.  In most cases, the client will get grant back immediately in the reply, unless the filesystem is low on free space.&lt;/p&gt;</comment>
                            <comment id="278410" author="tappro" created="Mon, 31 Aug 2020 19:21:21 +0000"  >&lt;p&gt;yes, I understand that, meanwhile we don&apos;t just consume grants but also increase &lt;tt&gt;cl_dirty_pages&lt;/tt&gt; and &lt;tt&gt;obd_dirty_pages&lt;/tt&gt;&#160;counters during that and do that without regards to limits, so technically these values can become greater than their cap and prevent cache entering in &lt;tt&gt;osc_enter_cache_try()&lt;/tt&gt;&#160;for a non-DIO writers. So actually the question is - should we increase &lt;tt&gt;cl_dirty_pages&lt;/tt&gt;&#160;and &lt;tt&gt;obd_dirty_pages&lt;/tt&gt; at all? Or better keep them untouched with DIO writes. Probably that is not big deal because as you said - it returns back quite quickly&lt;/p&gt;</comment>
                            <comment id="278963" author="vsaveliev" created="Mon, 7 Sep 2020 11:47:18 +0000"  >&lt;blockquote&gt;
&lt;p&gt;I&apos;ve noted that added code does pretty the same as osc_enter_cache_try() but skips the following checks:&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;osc_enter_cache_try() checks the dirty page counter in order to throttle dirty page generation. In case of DIO we want to submit I/O as soon as possible. So, I guess that is why check for dirty page counter is missing in the patch.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;So actually the question is - should we increase cl_dirty_pages and obd_dirty_pages at all? Or better keep them untouched with DIO writes. Probably that is not big deal because as you said - it returns back quite quickly&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;cl_dirty_pages and obd_dirty_pages are increased for DIO case in order to minimize changes: osc_free_grant() remains unchanged with that.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;technically these values can become greater than their cap and prevent cache entering in osc_enter_cache_try() for a non-DIO writers.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;I see no problem with that as it decreases write rpc congestion on network and on server.&lt;/p&gt;

</comment>
                            <comment id="278964" author="tappro" created="Mon, 7 Sep 2020 11:58:12 +0000"  >&lt;p&gt;OK, if you see no problem with that then ticket can be closed&#160;&lt;/p&gt;</comment>
                            <comment id="279586" author="gerrit" created="Tue, 15 Sep 2020 05:09:31 +0000"  >&lt;p&gt;Oleg Drokin (green@whamcloud.com) merged in patch &lt;a href=&quot;https://review.whamcloud.com/39386/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/39386/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-12687&quot; title=&quot;Fast ENOSPC on direct I/O&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-12687&quot;&gt;&lt;del&gt;LU-12687&lt;/del&gt;&lt;/a&gt; osc: consume grants for direct I/O&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: b2_12&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: ab95f0c361a1e0e65ac51fe15ada4cb1e7eeaa1e&lt;/p&gt;</comment>
                            <comment id="280509" author="pjones" created="Thu, 24 Sep 2020 13:45:09 +0000"  >&lt;p&gt;Seems to be landed&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                        <issuelink>
            <issuekey id="23274">LU-4664</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="56901">LU-12757</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="59896">LU-13766</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="60238">LU-13847</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="21786">LU-4198</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|i00lnr:</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>