Re: [PATCH] stop swapoff 3/3 OOMkill

From: Hugh Dickins (
Date: Thu Apr 17 2003 - 18:10:19 EST

On Thu, 17 Apr 2003, Andrew Morton wrote:
> 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?

Probably not. I did try something like that over a year ago, and it
didn't work as well as I'd expected. One problem, I think, is that
while it's going through pages already in the swap cache, swapoff
may not need to allocate memory itself; but meanwhile other tasks
are trying to allocate memory and getting OOMkilled. I think that
argues that swapoff does need to register itself for the duration
with the OOMkiller: a PF_ flag achieves that but a __GFP flag does not.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Wed Apr 23 2003 - 22:00:22 EST