All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <ak@suse.de>
To: "Chen, Kenneth W" <kenneth.w.chen@intel.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	manfred@colorfullife.com
Subject: Re: Weird schedule delay time for cache_reap()
Date: Thu, 27 Oct 2005 10:37:08 +0200	[thread overview]
Message-ID: <200510271037.08853.ak@suse.de> (raw)
In-Reply-To: <200510270228.j9R2SWg27777@unix-os.sc.intel.com>

On Thursday 27 October 2005 04:28, Chen, Kenneth W wrote:
> can't convince myself that the 2nd argument in schedule_delayed_work
>called from cache_reap() function make any sense:


>static void cache_reap(void *unused)
>{ ...
>schedule_delayed_work(&__get_cpu_var(reap_work), REAPTIMEOUT_CPUC + 
smp_processor_id());
>
> Suppose one have a lucky 1024-processor big iron numa box,
> cpu0 will do cache_reap every 2 sec (REAPTIMEOUT_CPUC = 2*HZ).
> cpu512 will do cache_reap every 4 sec,
> cpu1023 will do cache_reap every 6 sec.
>
> Is the skew intentional on different CPU?  Why different interval for
> different cpu#?

It looks like a buggy attempt to make the timers not cluster.
The +smp_processor_id() should be probably only done on the first iteration.
start_cpu_timer() does this already, so removing it should be ok.

-Andi

WARNING: multiple messages have this Message-ID (diff)
From: Andi Kleen <ak@suse.de>
To: "Chen, Kenneth W" <kenneth.w.chen@intel.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	manfred@colorfullife.com
Subject: Re: Weird schedule delay time for cache_reap()
Date: Thu, 27 Oct 2005 10:37:08 +0200	[thread overview]
Message-ID: <200510271037.08853.ak@suse.de> (raw)
In-Reply-To: <200510270228.j9R2SWg27777@unix-os.sc.intel.com>

On Thursday 27 October 2005 04:28, Chen, Kenneth W wrote:
> can't convince myself that the 2nd argument in schedule_delayed_work
>called from cache_reap() function make any sense:


>static void cache_reap(void *unused)
>{ ...
>schedule_delayed_work(&__get_cpu_var(reap_work), REAPTIMEOUT_CPUC + 
smp_processor_id());
>
> Suppose one have a lucky 1024-processor big iron numa box,
> cpu0 will do cache_reap every 2 sec (REAPTIMEOUT_CPUC = 2*HZ).
> cpu512 will do cache_reap every 4 sec,
> cpu1023 will do cache_reap every 6 sec.
>
> Is the skew intentional on different CPU?  Why different interval for
> different cpu#?

It looks like a buggy attempt to make the timers not cluster.
The +smp_processor_id() should be probably only done on the first iteration.
start_cpu_timer() does this already, so removing it should be ok.

-Andi

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2005-10-27  8:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-27  2:28 Weird schedule delay time for cache_reap() Chen, Kenneth W
2005-10-27  2:28 ` Chen, Kenneth W
2005-10-27  8:37 ` Andi Kleen [this message]
2005-10-27  8:37   ` Andi Kleen

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=200510271037.08853.ak@suse.de \
    --to=ak@suse.de \
    --cc=kenneth.w.chen@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=manfred@colorfullife.com \
    /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.