All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nish Aravamudan <nish.aravamudan@gmail.com>
To: Christoph Lameter <clameter@sgi.com>
Cc: akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Prezeroing V8
Date: Thu, 17 Mar 2005 14:59:31 -0800	[thread overview]
Message-ID: <29495f1d05031714596de3b335@mail.gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.58.0503171340480.9678@schroedinger.engr.sgi.com>

On Thu, 17 Mar 2005 13:43:47 -0800 (PST), Christoph Lameter
<clameter@sgi.com> wrote:
> 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
> 
> Signed-off-by: Christoph Lameter <clameter@sgi.com>
> 

<snip>

> Index: linux-2.6.11/mm/scrubd.c
> ===================================================================
> --- /dev/null   1970-01-01 00:00:00.000000000 +0000
> +++ linux-2.6.11/mm/scrubd.c    2005-03-17 13:12:23.000000000 -0800

<snip>

> +/*
> + * scrub_pgdat() will work across all this node's zones.
> + */
> +static void scrub_pgdat(pg_data_t *pgdat)
> +{
> +       int i;
> +
> +       if (system_state != SYSTEM_RUNNING)
> +               return;
> +
> +        while (avenrun[0] >= ((unsigned long)sysctl_scrub_load << FSHIFT))
> +               schedule_timeout(30*HZ);

This is a busy-loop, unless you set the state before you call
schedule_timeout(). Additionally, you really want to sleep 30 seconds
at a time? Please use msleep() or msleep_interruptible(), unless you
expect wait-queue events.

Thanks,
Nish

  parent reply	other threads:[~2005-03-17 22:59 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 ` Nish Aravamudan [this message]
2005-03-17 23:06   ` [PATCH] Prezeroing V8 Christoph Lameter
2005-03-18  3:14     ` Benjamin Herrenschmidt
2005-03-25  1:44 ` Pavel Machek
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=29495f1d05031714596de3b335@mail.gmail.com \
    --to=nish.aravamudan@gmail.com \
    --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.