lkml.org 
[lkml]   [2013]   [Dec]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] mm, page_alloc: make __GFP_NOFAIL really not fail
On Tue, 10 Dec 2013, Andrew Morton wrote:

> > Heh, it's difficult to remove __GFP_NOFAIL when new users get added:
> > 84235de394d9 ("fs: buffer: move allocation failure loop into the
> > allocator") added a new user
>
> That wasn't reeeeealy a new user - it was "convert an existing
> open-coded retry-for-ever loop". Which is what __GFP_NOFAIL is for.
>

No, it just looks like that's what it did. find_or_create_page() in that
function does an order-0 allocation which always implicitly __GFP_NOFAIL
because of the should_alloc_retry() behavior. So why does it need to add
__GFP_NOFAIL there now? Because it is now allowed to bypass memcg limits
to the root memcg, which is new behavior with the patch. It adds
additional memcg powers that can't be duplicated in the caller, so now
it's really become __GFP_BYPASS_MEMCG_LIMIT_ON_OOM for everything that was
doing order-3 or smaller allocations, which should be all existing
__GFP_NOFAIL users.


\
 
 \ /
  Last update: 2013-12-11 01:41    [W:0.102 / U:0.304 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site