Re: readahead and oom

From: Andrew Morton
Date: Tue Apr 26 2011 - 15:51:19 EST


On Tue, 26 Apr 2011 17:20:29 +0800
Wu Fengguang <fengguang.wu@xxxxxxxxx> wrote:

> Pass __GFP_NORETRY|__GFP_NOWARN for readahead page allocations.
>
> readahead page allocations are completely optional. They are OK to
> fail and in particular shall not trigger OOM on themselves.

I have distinct recollections of trying this many years ago, finding
that it caused problems then deciding not to do it. But I can't find
an email trail and I don't remember the reasons :(

If the system is so stressed for memory that the oom-killer might get
involved then the readahead pages may well be getting reclaimed before
the application actually gets to use them. But that's just an aside.

Ho hum. The patch *seems* good (as it did 5-10 years ago ;)) but there
may be surprising side-effects which could be exposed under heavy
testing. Testing which I'm sure hasn't been performed...


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