Re: [PATCH] 2.6.5-aa1 arch updates

From: Andrew Morton
Date: Sun Apr 04 2004 - 16:53:14 EST


Hugh Dickins <hugh@xxxxxxxxxxx> wrote:
>
> I notice that's a __GFP_REPEAT allocation, but even those fail when
> OOM-killed - I find its alias __GFP_NOFAIL very misleading.

#define __GFP_REPEAT 0x400 /* Retry the allocation. Might fail */
#define __GFP_NOFAIL 0x800 /* Retry for ever. Cannot fail */

__GFP_REPEAT is mainly for higher-order allocations which would otherwise
have given up too early.

__GFP_NOFAIL means "the caller is lame and cannot handle a failure".

Yes, they're the same thing at present. But if someone chooses to change
the page allocator so that it returns 0 on exhaustion rather than
oom-killing, these two things become different - the altered page allocator
should continue to loop-until-success on __GFP_NOFAIL allocations.

I guess this means that __GFP_NOFAIL allocators shouldn't be oom-killed.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/