[lkml]   [2001]   [Jun]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [RFT][PATCH] even out background aging
On Fri, 15 Jun 2001, Rik van Riel wrote:

> [Request For Testers: please test this on your system...]
> Hi,
> the following patch makes use of the fact that refill_inactive()
> now calls swap_out() before calling refill_inactive_scan() and
> the fact that the inactive_dirty list is now reclaimed in a fair
> LRU order.
> Background scanning can now be replaced by a simple call to
> refill_inactive(), instead of the refill_inactive_scan(), which
> gave mapped pages an unfair advantage over unmapped ones.

Hi Rik,

While I was testing this suggestion (still actually) prior to your
RFT, the first thing I did was the straight substitution, but under
heavy load, the additional swap/aging when there is a ~persistant
shortage hurt ~fairly badly. What I did instead, and shows no ill
effects under any load I've tried so far was...

/* If needed, try to free some memory. */
if (inactive_shortage() || free_shortage())
do_try_to_free_pages(GFP_KSWAPD, 0);
else {
/* Do background page aging. */
refill_inactive_scan(DEF_PRIORITY, 0);

I still had the benefit of idle pages being pushed to disk quickly
and staying there :) IMHO, this is the first real candidate for a
sysctl tunable, as it's possibly not good for everyone. As indicated
privately, I like the effect of this suggestion a lot, but laptop
people may not because of the infrequent and miniscule swapin (which
_might_ be an irritant _if_ they are doing enough work etc etc).


(this report would have landed in your mailbox tomorrow.. I was too
slow. sending it to lkml lest someone sees the same high load thing
I did and determine it's a loss unfairly)

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:55    [W:0.029 / U:0.872 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site