[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150603132837.GB16201@dhcp22.suse.cz>
Date: Wed, 3 Jun 2015 15:28:37 +0200
From: Michal Hocko <mhocko@...e.cz>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: linux-mm@...ck.org, Dave Chinner <david@...morbit.com>,
Neil Brown <neilb@...e.de>,
Johannes Weiner <hannes@...xchg.org>,
Al Viro <viro@...iv.linux.org.uk>,
Mel Gorman <mgorman@...e.de>, Rik van Riel <riel@...hat.com>,
Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>,
LKML <linux-kernel@...r.kernel.org>,
linux-fsdevel@...r.kernel.org
Subject: Re: [RFC 0/2] mapping_gfp_mask from the page fault path
On Tue 02-06-15 13:22:41, Andrew Morton wrote:
> On Mon, 1 Jun 2015 15:00:01 +0200 Michal Hocko <mhocko@...e.cz> wrote:
>
> > I somehow forgot about these patches. The previous version was
> > posted here: http://marc.info/?l=linux-mm&m=142668784122763&w=2. The
> > first attempt was broken but even when fixed it seems like ignoring
> > mapping_gfp_mask in page_cache_read is too fragile because
> > filesystems might use locks in their filemap_fault handlers
> > which could trigger recursion problems as pointed out by Dave
> > http://marc.info/?l=linux-mm&m=142682332032293&w=2.
> >
> > The first patch should be straightforward fix to obey mapping_gfp_mask
> > when allocating for mapping. It can be applied even without the second
> > one.
>
> I'm not so sure about that. If only [1/2] is applied then those
> filesystems which are setting mapping_gfp_mask to GFP_NOFS will now
> actually start using GFP_NOFS from within page_cache_read() etc. The
> weaker allocation mode might cause problems.
They are using the weaker allocation mode in this context already
because page_cache_alloc_cold is obeying mapping gfp mask. So all this
patch does is to make sure that add_to_page_cache_lru gfp_maks is in
sync with other allocations. So I do not see why this would be a
problem. Quite opposite if the function was called from a real GFP_NOFS
context we could deadlock with the current code.
--
Michal Hocko
SUSE Labs
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists