lkml.org 
[lkml]   [2009]   [Jun]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 3/3 -mmotm] oom: invoke oom killer for __GFP_NOFAIL
On Tue, 2 Jun 2009, David Rientjes wrote:

> With my patch, we kill a memory hogging task that will free some memory so
> the allocation will succeed (or multiple tasks if insufficient contiguous
> memory is available). Kernel allocations use __GFP_NOFAIL, so the fault
> of this memory freeing is entirely on the caller, not the page allocator.
>
> My preference for handling this is to merge my patch (obviously :), and
> then hopefully deprecate __GFP_NOFAIL as much as possible although I don't
> suspect it could be eradicated forever.
>

I really hope this patch isn't getting dropped because it fixes the
possibility that a __GFP_NOFAIL allocation will fail when its definition
is to the contrary. Depending on the size of the allocation, that can
cause a panic in at least the reiserfs, ntfs, cxgb3, and gfs2 cases.

As I mentioned before, it's a noble goal to deprecate __GFP_NOFAIL as much
as possible and (at the least) prevent it from trying high-order
allocation attempts. The current implementation of the flag is
problematic, however, and this patch addresses it by attempting to free
some memory when direct reclaim fails.

This change has already been acked by Rik van Riel in
http://marc.info/?l=linux-kernel&m=124199910508930 and Mel Gorman in
http://marc.info/?l=linux-kernel&m=124203850416159.


\
 
 \ /
  Last update: 2009-06-04 00:13    [W:0.061 / U:2.668 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site