Re: Kswapd flaw

From: Nix
Date: Tue Jun 28 2005 - 05:52:05 EST


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.

This is how the kernel has always worked. If you have no swap, memory
pressure is higher than it otherwise might be, because dirty pages must
be kept in physical RAM even if they are rarely used. So when memory gets
low the kernel *has* to evict pages which aren't dirty, and write out and
flush dirty pages corresponding to files on disk.

What else could it possibly do? Stop evicting everything?

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.

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