Re: [PATCH] stop swapoff 3/3 OOMkill

Hugh Dickins (hugh@veritas.com)
Fri, 18 Apr 2003 00:10:19 +0100 (BST)


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

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.

Hugh

-
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/