From: Pranith Kumar <bobby.prani@gmail.com>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
Daniel Lezcano <daniel.lezcano@linaro.org>,
linux-pm@vger.kernel.org (open list:CPUIDLE DRIVERS),
linux-kernel@vger.kernel.org (open list)
Subject: [RFC PATCH] cpuidle: Use a lighter barrier in snooze_loop()
Date: Sat, 15 Nov 2014 21:00:07 -0500 [thread overview]
Message-ID: <1416103207-18293-1-git-send-email-bobby.prani@gmail.com> (raw)
Using smp_mb() here so that the bit clear is not reordered is an overkill.
It is more appropriate to use smp_mb__after_atomic() which ensures that the
bit clear is not reordered.
Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
---
drivers/cpuidle/cpuidle-powernv.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/cpuidle/cpuidle-powernv.c b/drivers/cpuidle/cpuidle-powernv.c
index 7d3a349..b0bfcbe 100644
--- a/drivers/cpuidle/cpuidle-powernv.c
+++ b/drivers/cpuidle/cpuidle-powernv.c
@@ -48,7 +48,8 @@ static int snooze_loop(struct cpuidle_device *dev,
HMT_medium();
ppc64_runlatch_on();
clear_thread_flag(TIF_POLLING_NRFLAG);
- smp_mb();
+ /* ensure bit clear is not reordered */
+ smp_mb__after_atomic();
return index;
}
--
1.9.1
reply other threads:[~2014-11-16 2:00 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1416103207-18293-1-git-send-email-bobby.prani@gmail.com \
--to=bobby.prani@gmail.com \
--cc=daniel.lezcano@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@rjwysocki.net \
/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