From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Josh Boyer <jwboyer@gmail.com>
Cc: "Sergey Senozhatsky" <sergey.senozhatsky@gmail.com>,
"Eric Dumazet" <eric.dumazet@gmail.com>,
"Ingo Molnar" <mingo@elte.hu>,
"Linus Torvalds" <torvalds@linux-foundation.org>,
linux-kernel@vger.kernel.org,
"Frédéric Weisbecker" <fweisbec@gmail.com>,
"Thomas Gleixner" <tglx@linutronix.de>,
"Peter Zijlstra" <a.p.zijlstra@chello.nl>,
Andre@jasper.es
Subject: Re: [GIT PULL] RCU changes for v3.3
Date: Wed, 7 Mar 2012 07:27:03 -0800 [thread overview]
Message-ID: <20120307152703.GD2348@linux.vnet.ibm.com> (raw)
In-Reply-To: <CA+5PVA4CdtQYbJBvpoAa7iyWegBpJaDBcFfXpXYX=pARw_SBSA@mail.gmail.com>
On Wed, Mar 07, 2012 at 09:09:39AM -0500, Josh Boyer wrote:
> On Wed, Mar 7, 2012 at 6:44 AM, Sergey Senozhatsky
> <sergey.senozhatsky@gmail.com> wrote:
> > > > > ------------------------------------------------------------------------
> >> > > >
> >> > > > idle: Avoid using RCU when RCU thinks the CPU is idle
> >> > > >
> >> > > > The x86 idle loops invoke cpuidle_idle_call() which uses tracing
> >> > > > which uses RCU. Unfortunately, these idle loops have already
> >> > > > told RCU to ignore this CPU when they call it. This patch hacks
> >> > > > the idle loops to avoid this problem, but probably causing several
> >> > > > other problems in the process.
> >> > > >
> >> > > > Not-yet-signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
> >> > > > ---
> >> > >
> >> > > Hi Paul
> >> > >
> >> > > Just tested it on my x86_64 machine, but warnings are still here
> >> > >
> >> > > Thanks !
> >> >
> >> > Gah!!! The mwait_idle() function itself (which is the default value of
> >> > the pm_idle function pointer) uses tracing and thus RCU! What part of
> >> > "don't use RCU from idle CPUs" was unclear, one wonders?
> >> >
> >> > Ah well, the good news is that we can now detect such abuse and fix it.
> >> >
> >> > But fixing it appears to require pushing rcu_idle_enter() and
> >> > rcu_idle_exit() pairs down to the bottom of each and every idle loop
> >> > and governor.
> >> >
> >> > So... The cpuidle_idle_call() function has an idle loop inside of itself,
> >> > namely the ->enter() call for the desired target state. It does tracing
> >> > on both sides of that call. Should the ->enter() calls actually avoid
> >> > use of tracing, I could push the rcu_idle_enter() and rcu_idle_exit()
> >> > down into cpuidle_idle_call(). We seem to have a ladder_governor and
> >> > a menu_governor in 3.2, and these have states, which in turn have ->enter
> >> > functions.
> >> >
> >> > Hmmm... Residual power dissipation is given in milliwatts. I could
> >> > imagine some heartburn from many of the more aggressive embedded folks,
> >> > given that they might prefer microwatts -- or maybe even nanowatts,
> >> > for all I know.
> >> >
> >> > There are a bunch of states defined in drivers/idle/intel_idle.c,
> >> > and these use intel_idle() as their ->enter() states. This one looks
> >> > to have a nice place for rcu_idle_enter() and rcu_idle_exit().
> >> >
> >> > But I also need to push rcu_idle_enter() and rcu_idle_exit() into any
> >> > function that can be assigned to pm_idle(): default_idle(), poll_idle(),
> >> > mwait_idle(), and amd_e400_idle(). OK, that is not all -that- bad,
> >> > though this must also be done for a number of other architectures as well.
> >> >
> >> > OK, will post a patch. I will need testing -- clearly my testing on KVM
> >> > is missing a few important code paths...
> >>
> >> And here is another version of the patch.
> > Hello,
> > I just hit the same problem.
> >
> > Is this patch scheduled for 3.3 until release or will land during 3.4
> > merge window?
>
> There are 3 patches in Paul's 3.4 queue, and another 9 of Steven Rostedt's
> that fix this. They'll wind up in 3.4.
>
> I looked at reverting the patch that adds this new warning and it doesn't
> trivially revert.
What are you based on? I should be able to disable the warning for
you easily enough.
Thanx, Paul
next prev parent reply other threads:[~2012-03-07 15:28 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-05 13:54 Ingo Molnar
2012-01-24 16:25 ` Eric Dumazet
2012-01-24 16:53 ` Paul E. McKenney
2012-01-24 17:04 ` Frederic Weisbecker
2012-01-24 19:09 ` Paul E. McKenney
2012-01-24 17:13 ` Eric Dumazet
2012-01-24 19:41 ` Paul E. McKenney
2012-01-24 19:57 ` Eric Dumazet
2012-01-24 21:11 ` Paul E. McKenney
2012-01-24 22:07 ` Mark Brown
2012-01-24 22:43 ` Paul E. McKenney
2012-01-24 23:51 ` Mark Brown
2012-01-25 1:36 ` Paul E. McKenney
2012-01-25 11:59 ` Mark Brown
2012-01-24 23:29 ` Paul E. McKenney
2012-01-24 23:46 ` Eric Dumazet
2012-01-24 23:54 ` Paul E. McKenney
2012-03-07 11:44 ` Sergey Senozhatsky
2012-03-07 14:09 ` Josh Boyer
2012-03-07 15:27 ` Paul E. McKenney [this message]
2012-03-07 15:49 ` Josh Boyer
2012-03-08 21:26 ` Paul E. McKenney
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=20120307152703.GD2348@linux.vnet.ibm.com \
--to=paulmck@linux.vnet.ibm.com \
--cc=Andre@jasper.es \
--cc=a.p.zijlstra@chello.nl \
--cc=eric.dumazet@gmail.com \
--cc=fweisbec@gmail.com \
--cc=jwboyer@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=sergey.senozhatsky@gmail.com \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.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
Powered by JetHome