From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Christoph Lameter <cl@linux.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
Alok Kataria <akataria@vmware.com>,
"H. Peter Anvin" <hpa@zytor.com>, Ingo Molnar <mingo@elte.hu>,
Thomas Gleixner <tglx@linutronix.de>,
the arch/x86 maintainers <x86@kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
"alan@lxorguk.ukuu.org.uk" <alan@lxorguk.ukuu.org.uk>
Subject: Re: [PATCH] x86: Reduce the default HZ value
Date: Fri, 8 May 2009 08:06:34 -0700 [thread overview]
Message-ID: <20090508150634.GC6788@linux.vnet.ibm.com> (raw)
In-Reply-To: <alpine.DEB.1.10.0905081012420.23875@qirst.com>
On Fri, May 08, 2009 at 10:16:10AM -0400, Christoph Lameter wrote:
> On Fri, 8 May 2009, Paul E. McKenney wrote:
>
> > > Can't you simply enter idle state after a grace period completes and
> > > finds no pending callbacks for the next period. And leave idle state at
> > > the next call_rcu()?
> >
> > If there were no RCU callbacks -globally- across all CPUs, yes. But
> > the check at the end of rcu_irq_exit() is testing only on the current
> > CPU. Checking across all CPUs is expensive and racy.
> >
> > So what happens instead is that there is rcu_needs_cpu(), which gates
> > entry into dynticks-idle mode. This function returns 1 if there are
> > callbacks on the current CPU. So, if no CPU has an RCU callback, then
> > all CPUs can enter dynticks-idle mode so that the entire system is
> > quiescent from an RCU viewpoint -- no RCU processing at all.
>
> Did not follow RCU developments. But wasnt there a time when RCU periods
> were processor specific and a global RCU period was done when all the
> processors went through their rcu periods?
For non-realtime RCU implementations, after a given grace period starts,
once each CPU goes through a "quiescent state", then that grace period
can end. For realtime (AKA "preemptable") RCU, the focus is on tasks
rather than CPUs, but the same general principle applies, give or take
some implementation details: after a given grace period starts, once
each task goes through a quiescent state, then that grace period can end.
> Cpu cache hotness may not be relevant to RCU since rcu involves long time
> periods in which cachelines cool down. Can the RCU callbacks all be done
> on processor 0 (or a so designated processor)? That would avoiding
> disturbances of the other processors.
This approach -might- be OK for a specially configured and protected HPC
machine. But it is a non-starter for general-purpose machines. For an
example of why, consider a denial-of-service attack that continually
change routing tables could saturate CPU 0 and start falling behind,
eventually OOMing the machine.
But if you would like to experiment with this, make call_rcu() be a
wrapper that causes an underlying call_rcu_cpu_0() to be executed on
CPU 0. That won't get exactly the cache-warmth effects that you are
after, but it will let you see whether the machine would gracefully
handle various events that might dump large numbers of callbacks.
Thanx, Paul
next prev parent reply other threads:[~2009-05-08 15:12 UTC|newest]
Thread overview: 65+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-04 18:44 [PATCH] x86: Reduce the default HZ value Alok Kataria
2009-05-05 21:21 ` H. Peter Anvin
2009-05-05 21:44 ` Alan Cox
2009-05-05 22:09 ` Alok Kataria
2009-05-05 22:33 ` Alan Cox
2009-05-05 23:37 ` Alok Kataria
2009-05-07 14:09 ` Christoph Lameter
2009-05-07 15:12 ` Alan Cox
2009-05-05 21:57 ` Alok Kataria
2009-05-07 14:13 ` Christoph Lameter
2009-05-07 15:14 ` Alan Cox
2009-05-07 15:20 ` Christoph Lameter
2009-05-07 15:30 ` H. Peter Anvin
2009-05-07 15:40 ` Christoph Lameter
2009-05-07 16:55 ` Jeff Garzik
2009-05-07 17:09 ` Alan Cox
2009-05-07 17:55 ` Jeff Garzik
2009-05-07 19:51 ` Alan Cox
2009-05-07 20:03 ` Jeff Garzik
2009-05-07 20:30 ` Alan Cox
2009-05-07 16:37 ` Alok Kataria
2009-05-07 17:07 ` Peter Zijlstra
2009-05-07 17:13 ` Peter Zijlstra
2009-05-07 17:18 ` Peter Zijlstra
2009-05-07 17:20 ` Christoph Lameter
2009-05-07 17:39 ` Peter Zijlstra
2009-05-07 17:40 ` Christoph Lameter
2009-05-07 17:54 ` Paul E. McKenney
2009-05-07 17:51 ` Christoph Lameter
2009-05-07 19:51 ` Paul E. McKenney
2009-05-07 17:36 ` Paul E. McKenney
2009-05-07 17:38 ` Peter Zijlstra
2009-05-07 18:01 ` Paul E. McKenney
2009-05-07 18:12 ` Christoph Lameter
2009-05-07 19:06 ` Paul E. McKenney
2009-05-07 19:53 ` Alan Cox
2009-05-07 19:56 ` Christoph Lameter
2009-05-07 20:24 ` Alan Cox
2009-05-07 20:21 ` Christoph Lameter
2009-05-08 10:32 ` Peter Zijlstra
2009-05-08 12:50 ` Paul E. McKenney
2009-05-08 14:16 ` Christoph Lameter
2009-05-08 15:06 ` Paul E. McKenney [this message]
2009-05-07 17:18 ` Christoph Lameter
2009-05-07 17:37 ` Peter Zijlstra
2009-05-07 17:34 ` Christoph Lameter
2009-05-07 17:55 ` Peter Zijlstra
2009-05-07 17:55 ` Christoph Lameter
2009-05-07 17:19 ` Christoph Lameter
2009-05-07 17:45 ` Peter Zijlstra
2009-05-07 17:50 ` Christoph Lameter
2009-05-07 19:17 ` Peter Zijlstra
2009-05-07 19:38 ` Christoph Lameter
2009-05-07 21:01 ` H. Peter Anvin
2009-05-07 16:35 ` Chris Snook
2009-05-07 16:56 ` Alok Kataria
2009-05-07 20:29 ` Chris Snook
2009-05-07 20:34 ` Alan Cox
2009-05-07 22:16 ` Ravikiran G Thirumalai
2009-05-07 22:19 ` Alok Kataria
2009-05-08 9:31 ` Alan Cox
-- strict thread matches above, loose matches on Subject: below --
2009-05-12 19:45 devzero
2009-05-13 23:30 ` Alok Kataria
2009-05-14 20:25 devzero
2009-05-14 20:29 ` Alan Cox
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=20090508150634.GC6788@linux.vnet.ibm.com \
--to=paulmck@linux.vnet.ibm.com \
--cc=akataria@vmware.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=cl@linux.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=x86@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox