From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Mon, 8 Jan 2001 14:42:38 -0200 (BRDT) From: Rik van Riel Subject: Re: Subtle MM bug In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mm@kvack.org Return-Path: To: Marcelo Tosatti Cc: Linus Torvalds , "David S. Miller" , linux-mm@kvack.org List-ID: On Mon, 8 Jan 2001, Marcelo Tosatti wrote: > On Sun, 7 Jan 2001, Linus Torvalds wrote: > > > and just get rid of all the logic to try to "find the best mm". It's bogus > > anyway: we should get perfectly fair access patterns by just doing > > everything in round-robin, and each "swap_out_mm(mm)" would just try to > > walk some fixed percentage of the RSS size (say, something like > > > > count = (mm->rss >> 4) > > > > and be done with it. > > I have the impression that a fixed percentage of the RSS will be > a problem when you have a memory hog (or hogs) running. My RSS ulimit enforcing patches solve this problem in a very simple way. If a process is exceeding its RSS limit, we scan ALL pages from the process. Otherwise, we scan the normal percentage. Furthermore, I have put a default soft RSS limit of half of physical memory in the system. This means that when you have one big runaway process, kswapd will be more agressive against that process then against others. The fact that it is a soft limit, OTOH, means that the process can use all the available memory if there is no memory pressure in the system... regards, Rik -- Virtual memory is like a game you can't win; However, without VM there's truly nothing to lose... http://www.surriel.com/ http://www.conectiva.com/ http://distro.conectiva.com.br/ -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux.eu.org/Linux-MM/