Re: out_of_memory() heuristic broken for different mem configurations (fwd)

From: Linus Torvalds (torvalds@transmeta.com)
Date: Thu Nov 08 2001 - 12:00:27 EST


On Thu, 8 Nov 2001, Marcelo Tosatti wrote:
>
> I remember Linus had a reasoning for the "scan _ALL_ ptes until success"
> behaviour.
>
> Linus, was that due to zone-specific (eg DMA shortage on bigmem machine)
> shortages or ?

No, the major reason simply _is_ because it's fairly easy to come up with
test-cases that are mostly MAP_SHARED, and are not out-of-memory.
Returning early from swap_out() is simply fundamentally wrong - whether we
have free swap-space or not has very little to do with anything.

(Well, whether we have free swap space or not _is_ meaningful once we have
scanned all VM's, but not before that).

But see my suggestion about potentially noticing the oom _before_ calling
swap_out(). Thanks to anonymous-in-LRU we have a _lot_ of powerful
information that we simply traditionally haven't had. It doesn't just tell
us when we should start swapping out, it can also tell us if swap-out is
going to need swap-space or not. It can even tell how _much_ swap-space
we'll need to satisfy the "free N pages from the VM".

> However, the current code breaks badly as I've tested on the 16GB boxen.

I understand. I just think the fix needs to be different.

                Linus

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



This archive was generated by hypermail 2b29 : Thu Nov 15 2001 - 21:00:18 EST