[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181217093337.GC30879@dhcp22.suse.cz>
Date: Mon, 17 Dec 2018 10:33:37 +0100
From: Michal Hocko <mhocko@...nel.org>
To: Matthew Wilcox <willy@...radead.org>
Cc: Hou Tao <houtao1@...wei.com>, phillip@...ashfs.org.uk,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-mm@...ck.org
Subject: Re: [PATCH] squashfs: enable __GFP_FS in ->readpage to prevent hang
in mem alloc
On Sun 16-12-18 19:51:57, Matthew Wilcox wrote:
[...]
> Ah, yes, that makes perfect sense. Thank you for the explanation.
>
> I wonder if the correct fix, however, is not to move the check for
> GFP_NOFS in out_of_memory() down to below the check whether to kill
> the current task. That would solve your problem, and I don't _think_
> it would cause any new ones. Michal, you touched this code last, what
> do you think?
What do you mean exactly? Whether we kill a current task or something
else doesn't change much on the fact that NOFS is a reclaim restricted
context and we might kill too early. If the fs can do GFP_FS then it is
obviously a better thing to do because FS metadata can be reclaimed as
well and therefore there is potentially less memory pressure on
application data.
--
Michal Hocko
SUSE Labs
Powered by blists - more mailing lists