[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] reapswap for 2.4.5-ac10



Jonathan Morton wrote:
> 
> Interesting observation.  Something else though, which kswapd is guilty of
> as well: consider a page shared among many processes, eg. part of a
> library.  As kswapd scans, the page is aged down for each process that uses
> it.  So glibc gets aged down many times more quickly than a non-shared
> page, precisely the opposite of what we really want to happen.

Perhaps the page should be aged down by (1 / page->count)?

Just scale all the age stuff by 256 or 1000 or whatever and
instead of saying

	page->age -= CONSTANT;

you can use

	page->age -= (CONSTANT * 256) / atomic_read(page->count);


So the more users, the more slowly it ages.  You get the idea.
--
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-mm.org/