Re: Kswapd flaw

From: Nix
Date: Tue Jun 28 2005 - 07:53:38 EST


On 28 Jun 2005, Al Boldi yowled:
> Nix wrote:
>> On 28 Jun 2005, Al Boldi murmured woefully:
>>> Kswapd starts evicting processes to fullfil a malloc, when it should
>>> just deny it because there is no swap.
>> I can't even tell what you're expecting. Surely not that no pages are ever
>> evicted or flushed; your memory would fill up with page cache in no time.
>
> Please do flush anytime, and do it in sync during OOMs; but don't evict
> procs especially not RUNNING procs, that is overkill.

But processes (really, mapped text pages; really, read-only mapped pages
of all kinds) are loaded piecemeal in any case. Would you really like a
system where once something was faulted in, it could never leave? You'd
run out of memory *awfully* fast.

A system in which pages can be faulted in *and* out is consistent: one
in which they can only be faulted in is both inconsistent and very
deadlock-prone.

--
`I lost interest in "blade servers" when I found they didn't throw knives
at people who weren't supposed to be in your machine room.'
--- Anthony de Boer
-
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/