RE: Kswapd flaw

From: Al Boldi
Date: Tue Jun 28 2005 - 10:39:04 EST


Nix wrote:{
On Tue, 28 Jun 2005, Al Boldi wrote:
> Hi Nix, how are you?
> You wrote: {
> On 28 Jun 2005, Al Boldi yowled:
>> Please do flush anytime, and do it in sync during OOMs; but don't
>> evict procs especially not RUNNING procs, that is overkill.
>
> Would you really like a system where once something was faulted in, it
> could never leave? You'd run out of memory *awfully* fast.
> }
>
> You should only fault if you have a place to fault to, as into a swap.
> Without swap faulting is overkill.
>
> Is it possible to change kswapd's default behaviour to not fault if
> there is no swap?

I don't think so, except on a process-by-process basis via mlockall().
(/proc/sys/vm/swappiness lets you say that swapping is more or less
desirable, but under enough memory pressure paging *will* happen regardless
of the value of that variable.)

But I'm mystified as to why you might want to suppress paging. The only
effect of suppressing it is to reduce the amount of memory you can allocate
before you run completely out and start killing things.
}

Nix,
You start killing things because you overcommitted, when you were not
supposed to fault in the first place because you have no swap.

( I couldn't find /proc/sys/vm/swappiness in 2.4, although I heard about it
in 2.6.)

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