From: Michal Hocko <mhocko@suse.cz>
To: Nikolay Borisov <kernel@kyup.com>,
Johannes Weiner <hannes@cmpxchg.org>,
Andrew Morton <akpm@linux-foundation.org>
Cc: Dave Chinner <david@fromorbit.com>, Theodore Ts'o <tytso@mit.edu>,
Marian Marinov <mm@1h.com>, Hugh Dickins <hughd@google.com>,
linux-mm@kvack.org, LKML <linux-kernel@vger.kernel.org>,
linux-ext4@vger.kernel.org
Subject: Re: [PATCH] mm, vmscan: Do not wait for page writeback for GFP_NOFS allocations
Date: Wed, 1 Jul 2015 15:37:15 +0200 [thread overview]
Message-ID: <20150701133715.GA6287@dhcp22.suse.cz> (raw)
In-Reply-To: <20150701061731.GB6286@dhcp22.suse.cz>
[CCing Hugh as well]
On Wed 01-07-15 08:17:31, Michal Hocko wrote:
> On Tue 30-06-15 17:17:17, Michal Hocko wrote:
> [...]
> > Hi,
> > the issue has been reported http://marc.info/?l=linux-kernel&m=143522730927480.
> > This obviously requires a patch ot make ext4_ext_grow_indepth call
> > sb_getblk with the GFP_NOFS mask but that one makes sense on its own
> > and Ted has mentioned he will push it. I haven't marked the patch for
> > stable yet. This is the first time the issue has been reported and
> > ext4 writeout code has changed considerably in 3.11 and I am not sure
> > the issue was present before. e62e384e9da8 which has introduced the
> > wait_on_page_writeback has been merged in 3.6 which is quite some time
> > ago. If we go with stable I would suggest marking it for 3.11+ and it
> > should obviously go with the ext4_ext_grow_indepth fix.
>
> After Dave's additional explanation
> (http://marc.info/?l=linux-ext4&m=143570521212215) it is clear that the
> lack of __GFP_FS check was wrong from the very beginning. XFS is doing
> the similar thing from before the e62e384e9da8 was merged. I guess we
> were just lucky not to hit this problem sooner.
>
> That being said I think the patch should be marked for stable and the
> changelog updated:
>
> As per David Chinner the xfs is doing similar thing since 2.6.15 already
> so ext4 is not the only affected filesystem. Moreover he notes:
> : For example: IO completion might require unwritten extent conversion
> : which executes filesystem transactions and GFP_NOFS allocations. The
> : writeback flag on the pages can not be cleared until unwritten
> : extent conversion completes. Hence memory reclaim cannot wait on
> : page writeback to complete in GFP_NOFS context because it is not
> : safe to do so, memcg reclaim or otherwise.
>
> Cc: stable # 3.6+
> Fixes: e62e384e9da8 ("memcg: prevent OOM with too many dirty pages")
>
> Andrew let me know whether I should repost the patch with the updated
> changelog or you can take it from here.
Hmm, I have double checked the original commit and it turned out my
memory was failing me. e62e384e9da8 had may_enter_fs check. This has
been changed later in the same merge window by c3b94f44fcb0 ("memcg:
further prevent OOM with too many dirty pages") and the code has been
refactored later some more. So the changelog needs some more rewording:
---
next prev parent reply other threads:[~2015-07-01 13:37 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-30 15:17 Michal Hocko
2015-07-01 6:17 ` Michal Hocko
2015-07-01 13:37 ` Michal Hocko [this message]
2015-07-01 14:30 ` Rik van Riel
2015-07-02 14:25 ` Theodore Ts'o
2015-07-02 15:13 ` Michal Hocko
2015-08-04 6:32 ` Hugh Dickins
2015-08-04 9:51 ` Michal Hocko
2015-08-04 21:32 ` Hugh Dickins
2015-08-04 21:36 ` Hugh Dickins
2015-08-07 7:52 ` Nikolay Borisov
2015-08-13 2:13 ` Hugh Dickins
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150701133715.GA6287@dhcp22.suse.cz \
--to=mhocko@suse.cz \
--cc=akpm@linux-foundation.org \
--cc=david@fromorbit.com \
--cc=hannes@cmpxchg.org \
--cc=hughd@google.com \
--cc=kernel@kyup.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mm@1h.com \
--cc=tytso@mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox