[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20540be2-5961-ea86-1ad8-50fbb4d15c6e@lca.pw>
Date: Tue, 26 Mar 2019 12:28:14 -0400
From: Qian Cai <cai@....pw>
To: Christopher Lameter <cl@...ux.com>
Cc: akpm@...ux-foundation.org, catalin.marinas@....com,
mhocko@...nel.org, penberg@...nel.org, rientjes@...gle.com,
iamjoonsoo.kim@....com, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] kmemleaak: survive in a low-memory situation
On 3/26/19 12:00 PM, Christopher Lameter wrote:
>> + */
>> + gfp = (in_atomic() || irqs_disabled()) ? GFP_ATOMIC :
>> + gfp_kmemleak_mask(gfp) | __GFP_DIRECT_RECLAIM;
>> + object = kmem_cache_alloc(object_cache, gfp);
>> + }
>> +
>> if (!object) {
>
> If the alloc must succeed then this check is no longer necessary.
Well, GFP_ATOMIC could still fail. It looks like the only thing that will never
fail is (__GFP_DIRECT_RECLAIM | __GFP_NOFAIL) as it keeps retrying in
__alloc_pages_slowpath().
Powered by blists - more mailing lists