Messages in this thread | | | Date | Mon, 29 Jun 2009 12:20:29 -0700 | From | Andrew Morton <> | Subject | Re: upcoming kerneloops.org item: get_page_from_freelist |
| |
On Mon, 29 Jun 2009 16:30:07 +0100 Mel Gorman <mel@csn.ul.ie> 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?
| |