Re: RSS Limit implementation issue

From: Rik van Riel
Date: Fri Feb 10 2006 - 17:18:45 EST


On Fri, 10 Feb 2006, Ram Gupta wrote:

> Also we need to figure out a way for swapper to target pages based on
> RSS limit.

Indeed. You do not want an RSS limited process to get stuck
on an idle system, because nothing wants to free its memory.

> One possible disadvantage I can think is that as the swapper
> swaps out a page based on RSS limit, the process's rss will become
> within the rss limit & then scheduler will schedule this process again &
> hence possibly same page might have to be brought in. This may cause
> increase in swapping. What do you think how much realistic is this
> scenario?

Thanks to the swap cache, this should not be an issue.

You don't need to actually write the page to disk when removing
the page from the process RSS - you simply add it to the swap
cache, unmap it and move it to the far end of the inactive list,
where kswapd will run into it quickly if the system needs memory
again in the future.

--
All Rights Reversed
-
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/