Re: upcoming kerneloops.org item: get_page_from_freelist

From: Andrew Morton
Date: Mon Jun 29 2009 - 15:22:10 EST


On Mon, 29 Jun 2009 16:30:07 +0100
Mel Gorman <mel@xxxxxxxxx> wrote:

> Processes that have been OOM killed set the thread flag TIF_MEMDIE. A
> process such as this is expected to exit the page allocator but in the
> event it happens to have set __GFP_NOFAIL, it potentially loops forever.
>
> This patch checks TIF_MEMDIE when deciding whether to loop again in the
> page allocator. Such a process will now return NULL after direct reclaim
> and OOM killing have both been considered as options. The potential
> problem is that a __GFP_NOFAIL allocation can still return failure so
> callers must still handle getting returned NULL.

I don't think we should do this :(

The __GFP_NOFAIL callers are using __GFP_NOFAIL for a reason - they
just cannot handle an allocation failure at all. They won't even test
for a NULL return because a) they believe that __GFP_NOFAIL is magic and
b) if the allocation failed, they're screwed anyway.

So how feasible would it be to arrange for __GFP_NOFAIL callers to
ignore the oom-killing? Presumably this means that they'll need to kill
someone else and keep on trying?

--
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/