lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 10 Jan 2008 11:28:49 +0900
From:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
To:	Rik van Riel <riel@...hat.com>
Cc:	linux-kernel@...r.kernel.org, linux-mm@...ck.org,
	Lee Schermerhorn <Lee.Schermerhorn@...com>
Subject: Re: [patch 05/19] split LRU lists into anon & file sets

On Tue, 08 Jan 2008 15:59:44 -0500
Rik van Riel <riel@...hat.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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ