[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <01000169babb99b8-b583bf57-5104-45b7-a4d6-e7677c64ece2-000000@email.amazonses.com>
Date: Tue, 26 Mar 2019 16:00:50 +0000
From: Christopher Lameter <cl@...ux.com>
To: Qian Cai <cai@....pw>
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 Tue, 26 Mar 2019, Qian Cai wrote:
> + if (!object) {
> + /*
> + * The tracked memory was allocated successful, if the kmemleak
> + * object failed to allocate for some reasons, it ends up with
> + * the whole kmemleak disabled, so let it success at all cost.
"let it succeed at all costs"
> + */
> + 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.
Powered by blists - more mailing lists