lkml.org 
[lkml]   [2008]   [Jan]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 05/19] split LRU lists into anon & file sets
On Tue, 08 Jan 2008 15:59:44 -0500
Rik van Riel <riel@redhat.com> wrote:

> + rotate_sum = zone->recent_rotated_file + zone->recent_rotated_anon;
> +
> + /* Keep a floating average of RECENT references. */
> + if (unlikely(rotate_sum > min(anon, file))) {
> + spin_lock_irq(&zone->lru_lock);
> + zone->recent_rotated_file /= 2;
> + zone->recent_rotated_anon /= 2;
> + spin_unlock_irq(&zone->lru_lock);
> + rotate_sum /= 2;
> + }
> +
> + /*
> + * With swappiness at 100, anonymous and file have the same priority.
> + * This scanning priority is essentially the inverse of IO cost.
> + */
> + anon_prio = sc->swappiness;
> + file_prio = 200 - sc->swappiness;
> +
> + /*
> + * anon recent_rotated_anon
> + * %anon = 100 * ----------- / ------------------- * IO cost
> + * anon + file rotate_sum
> + */
> + ap = (anon_prio * anon) / (anon + file + 1);
> + ap *= rotate_sum / (zone->recent_rotated_anon + 1);
> + if (ap == 0)
> + ap = 1;
> + else if (ap > 100)
> + ap = 100;
> + percent[0] = ap;
> +

Hmm, it seems..

When a program copies large amount of files, recent_rotated_file increases
rapidly and

rotate_sum
----------
recent_rotated_anon

will be very big.

And %ap will be big regardless of vm_swappiness if it's not 0.

I think # of recent_successful_pageout(anon/file) should be took into account...

I'm sorry if I miss something.

Thanks,
-Kame



\
 
 \ /
  Last update: 2008-01-10 03:29    [W:0.130 / U:4.936 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site