Messages in this thread |  | | Date | Fri, 5 Oct 2001 13:02:36 -0700 (PDT) | From | Linus Torvalds <> | Subject | Re: pre4 oom too soon |
| |
On Fri, 5 Oct 2001, Marcelo Tosatti wrote: > > Note that a full kswapd_balance_pgdat() is going to scan only a small > portion of the lists. I'm pretty sure we have to guarantee kswapd > scanned at least all lists (maybe scanned all lists twice), before > checking for OOM.
Why not just say "if we have swap cache pages, we aren't oom".
If we've scanned all lists twice, we should have unmapped all users of swap-cache pages, and we should have dropped them.
And make the test be not quite black-and-white: we're almost always going to have a _few_ swap-cache pages around under heavy memory load, if only because of read-ahead etc that pins the pages. But if the swap cache is a noticeable fraction of memory, we're obviously not oom _regardless_ of what the VM balancers say.
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/
|  |