lkml.org 
[lkml]   [2003]   [Apr]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] stop swapoff 3/3 OOMkill
Hugh Dickins <hugh@veritas.com> wrote:
>
> Current behaviour is that once swapoff has filled memory, other tasks
> get OOMkilled one by one until it completes, or more likely hangs.
> Better that swapoff be the first choice for OOMkill.

This calls for __GFP_NORETRY. It will disable the oom-kill and the infinite
retry in the page allocator. So we will have:

__GFP_REPEAT:

retry the allocation, but the caller can handle a failure.
eg: pte_alloc_one().

__GFP_REPEAT _may_ end up returning NULL. It depends on the VM
implemention - eg it would in -aa kernels.

__GFP_NOFAIL:

retry the allocation inifinitely, regardless of the VM implementation.
For jbd_kmalloc() and others.

__GFP_NORETRY:

Don't oom-kill and don't retry. For swapoff.

I've implemented a __GFP_REPEAT, and don't like it, because it blurs the
__GFP_REPEAT and __GFP_NOFAIL requirements. I'll add __GFP_NORETRY and we
can then pass that into read_swap_cache_async() and handle the error.

Sound good?


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:34    [W:0.036 / U:0.280 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site