All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Christoph Lameter <clameter@sgi.com>
Cc: akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Prezeroing V8
Date: Fri, 25 Mar 2005 02:44:11 +0100	[thread overview]
Message-ID: <20050325014411.GA7698@elf.ucw.cz> (raw)
In-Reply-To: <Pine.LNX.4.58.0503171340480.9678@schroedinger.engr.sgi.com>

Hi!

> Changelog:
> - Drop clear_pages and the approach to zero pages of higher order
>   first
> - Zero a percentage of pages from all orders to avoid fragmentation
> 
> Adds management of ZEROED and NOT_ZEROED pages and a background daemon
> called scrubd. /proc/sys/vm/scrubd_load, /proc/sys/vm_scrubd_start and
> /proc/sys/vm_scrubd_stop control the scrub daemon. See Documentation/vm/
> scrubd.txt
> 
> In an SMP environment the scrub daemon is typically running on the most
> idle cpu. Thus a single threaded application running
> on one cpu may have the other cpu zeroing pages for it etc. The scrub
> daemon is hardly noticable and usually finishes zeroing quickly since
> most processors are optimized for linear memory filling.
> 
> Patch against 2.6.11.3-bk3

> +unsigned int sysctl_scrub_start = 100;	/* Min percentage of zeroed free pages per zone (~10% default) */
> +unsigned int sysctl_scrub_stop = 300;	/* Max percentage of zeroed free pages per zone (~30% default) */
> +unsigned int sysctl_scrub_load = 1;	/* Do not run scrubd if load > */


Perhaps that variable should be called sysctl_scrub*d*_load?

....
> +        while (avenrun[0] >= ((unsigned long)sysctl_scrub_load << FSHIFT))
> +		schedule_timeout(30*HZ);
> +
> +	for (i = 0; i < pgdat->nr_zones; i++)
> +		zero_zone(pgdat->node_zones +i);

tabs vs. spaces alert, but more importantly....
> --- /dev/null	1970-01-01 00:00:00.000000000 +0000
> +++ linux-2.6.11/Documentation/vm/scrubd.txt	2005-03-17 12:57:41.000000000 -0800
> @@ -0,0 +1,59 @@
> +The SCRUB Daemon
> +----------------
> +
> +The scrub daemon zeroes memory so that later requests for zeroed memory can
> +be satisifed without having to zero memory in a hot code path. The operations
> +of scrubd may be controlled through 3 variables in /proc/sys/vm:
> +
> +/proc/sys/vm/scrubd_load	default value	1
> +
> +	Scrubd is woken up if the system load is lower than this setting and
> +	the numer of unzeroed free pages drops below scrub_start*10 percent.
> +	The default setting of 1 insures that there will be no performance
> +	degradation in single user mode. In an SMP system a cpu is frequently
> +	idle despite the load being high. A setting of 9 or 99 may
> +	be useful then.

I don't think 1 guarantees no performance degradation. After all, it
is average load and scrubd might run at just the wrong times. Perhaps
it should default to 0?

								Pavel
-- 
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!

  parent reply	other threads:[~2005-03-25  1:48 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-17 21:43 [PATCH] Prezeroing V8 Christoph Lameter
2005-03-17 22:08 ` Andrew Morton
2005-03-17 22:31   ` Christoph Lameter
2005-03-17 23:11     ` Andrew Morton
2005-03-17 23:24       ` Christoph Lameter
2005-03-17 23:52         ` Andrew Morton
2005-03-18  0:00           ` Christoph Lameter
2005-03-17 23:26       ` Christoph Lameter
2005-03-17 23:59         ` Andrew Morton
2005-03-18  0:04           ` Christoph Lameter
2005-03-18  0:17             ` Andrew Morton
2005-03-18  0:29               ` Christoph Lameter
2005-03-18  1:36   ` [PATCH] Prezeroing V8 + free_hot_zeroed_page + free_cold_zeroed Christoph Lameter
2005-03-18  1:36     ` [PATCH] Prezeroing V8 + free_hot_zeroed_page + free_cold_zeroed page Christoph Lameter
2005-03-18  2:06     ` Jason Uhlenkott
2005-03-18  2:06       ` Jason Uhlenkott
2005-03-18  2:09       ` [PATCH] Prezeroing V8 + free_hot_zeroed_page + free_cold_zeroed Christoph Lameter
2005-03-18  2:09         ` [PATCH] Prezeroing V8 + free_hot_zeroed_page + free_cold_zeroed page Christoph Lameter
2005-03-18  5:43         ` Nish Aravamudan
2005-03-18  5:43           ` Nish Aravamudan
2005-03-17 22:59 ` [PATCH] Prezeroing V8 Nish Aravamudan
2005-03-17 23:06   ` Christoph Lameter
2005-03-18  3:14     ` Benjamin Herrenschmidt
2005-03-25  1:44 ` Pavel Machek [this message]
2005-03-25 12:28   ` Jan Engelhardt
2005-03-29  1:50   ` [PATCH] " Christoph Lameter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050325014411.GA7698@elf.ucw.cz \
    --to=pavel@ucw.cz \
    --cc=akpm@osdl.org \
    --cc=clameter@sgi.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.