Hugh Dickins <email@example.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:
retry the allocation, but the caller can handle a failure.
__GFP_REPEAT _may_ end up returning NULL. It depends on the VM
implemention - eg it would in -aa kernels.
retry the allocation inifinitely, regardless of the VM implementation.
For jbd_kmalloc() and others.
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.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to firstname.lastname@example.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Wed Apr 23 2003 - 22:00:22 EST