From: "Paul E. McKenney" <paulmck@us.ibm.com>
To: Zwane Mwaikambo <zwane@arm.linux.org.uk>
Cc: Andrew Morton <akpm@osdl.org>,
Stephen Rothwell <sfr@canb.auug.org.au>,
Linux Kernel <linux-kernel@vger.kernel.org>,
Li Shaohua <shaohua.li@intel.com>
Subject: Re: Fw: [RFC] Strange code in cpu_idle()
Date: Mon, 6 Dec 2004 08:04:05 -0800 [thread overview]
Message-ID: <20041206160405.GB1271@us.ibm.com> (raw)
In-Reply-To: <Pine.LNX.4.61.0412060157460.1036@montezuma.fsmlabs.com>
On Mon, Dec 06, 2004 at 02:38:33AM -0700, Zwane Mwaikambo wrote:
> Hi,
> The original intent to go with synchronize_kernel and RCU
> protection was for simplicity's sake, as the alternative implementations
> at the time looked like major overkill. Now in defense of this method,
> when entering the idle thread and placing the processor in a holding state
> (hlt) and an RCU grace period is begun, the processor in the holding state
> will be unaware of the new RCU grace period until it exits the idle loop
> callback (pm_idle) anyway, so the rcu_read will block the other processors
> from making RCU grace period completion as much as the processor holding
> state. This is true of all current pm_idle callbacks on i386, x86_64 and
> ia64 with the exception of APM (but i'll conveniently ignore that for now
> ;). When we do take an interrupt to exit the processor holding state and
> run through rcu_check_callbacks we will notice that we are in a hard
> interrupt and will defer marking of the processsor as quiescent. By that
> point we will have exited the idle thread callback therefore making it
> safe to use synchronize_kernel to protect removal of the callback.
I am not going to claim to thoroughly understand the power-management
code, but do have an additional question.
What happens if the processor became aware of a new grace period just
before entering pm_idle? I could imagine this code simply refusing
to power down the processor if there was a pending grace period, but
I don't see any sign of this. I could also imagine somehow deferring
interrupts until pm_idle exits. I don't see anything that looks like
it does this, but don't claim to be any sort of power-management
expert.
Thanx, Paul
next prev parent reply other threads:[~2004-12-06 16:10 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-05 0:45 Fw: [RFC] Strange code in cpu_idle() Paul E. McKenney
2004-12-06 0:16 ` Stephen Rothwell
2004-12-06 6:46 ` Stephen Rothwell
2004-12-06 10:00 ` Zwane Mwaikambo
2004-12-06 7:20 ` Andrew Morton
2004-12-06 9:38 ` Zwane Mwaikambo
2004-12-06 16:04 ` Paul E. McKenney [this message]
2004-12-06 16:47 ` Zwane Mwaikambo
2004-12-06 19:22 ` Paul E. McKenney
2004-12-11 15:07 ` Zwane Mwaikambo
2004-12-12 4:54 ` [PATCH] Remove RCU abuse " Zwane Mwaikambo
2004-12-12 5:06 ` Zwane Mwaikambo
2004-12-12 5:49 ` Zwane Mwaikambo
2004-12-13 6:13 ` Andrew Morton
2004-12-13 6:22 ` Zwane Mwaikambo
2004-12-13 6:32 ` Andrew Morton
2004-12-13 7:09 ` Zwane Mwaikambo
2004-12-13 6:41 ` Andrew Morton
2004-12-13 7:13 ` Zwane Mwaikambo
2004-12-19 2:40 ` Nish Aravamudan
2004-12-20 0:59 ` Zwane Mwaikambo
2004-12-20 1:15 ` Nick Piggin
2004-12-20 1:44 ` Zwane Mwaikambo
2004-12-20 1:56 ` Nick Piggin
2004-12-20 2:10 ` Zwane Mwaikambo
2004-12-20 2:30 ` Nish Aravamudan
2004-12-20 18:27 ` Nishanth Aravamudan
2004-12-20 22:57 ` Zwane Mwaikambo
2004-12-20 23:15 ` Andrew Morton
2004-12-20 23:16 ` Zwane Mwaikambo
2004-12-20 23:26 ` Nishanth Aravamudan
2004-12-20 2:26 ` Nish Aravamudan
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=20041206160405.GB1271@us.ibm.com \
--to=paulmck@us.ibm.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
--cc=shaohua.li@intel.com \
--cc=zwane@arm.linux.org.uk \
/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