lkml.org 
[lkml]   [2008]   [Jan]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 07/19] (NEW) add some sanity checks to get_scan_ratio
On Wed, 9 Jan 2008 13:16:42 +0900
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> wrote:

> > +
> > + free = zone_page_state(zone, NR_FREE_PAGES);
> > +
> > + /*
> > + * If we have no swap space, do not bother scanning anon pages
> > + */
> > + if (nr_swap_pages <= 0)
> > + percent[0] = 0;
> Doesn't this mean that swap-cache in ACTIVE_ANON_LIST is not scanned ?
> Or swap-cache is in File-Cache list ?

You are right, the swap cache will not be scanned once we run
completely out of swap space. To compensate for that, this
patch series has a patch that does scanning of swap cache and
freeing of swap space used by pages on the LRU list while there
is still space free.

Scanning all of the anon LRU lists could be a lot of work for
very little gain. A typical large server will have 32GB or
more of RAM, but only the default 2GB of swap.

All we accomplish by scanning the anonymous memory on a system
like that (once swap is full) is eating up CPU time and causing
lock contention.

--
All rights reversed.


\
 
 \ /
  Last update: 2008-01-09 13:55    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site