From: Heiko Carstens <heiko.carstens@de.ibm.com>
To: Andrew Morton <akpm@osdl.org>, "Paul E. McKenney" <paulmck@us.ibm.com>
Cc: dipankar@in.ibm.com, manfred@colorfullife.com,
linux-kernel@vger.kernel.org, davem@davemloft.net,
schwidefsky@de.ibm.com
Subject: [patch] s390: exploit rcu_needs_cpu() interface
Date: Tue, 25 Apr 2006 14:28:18 +0200 [thread overview]
Message-ID: <20060425122818.GC9421@osiris.boeblingen.de.ibm.com> (raw)
In-Reply-To: <20060425120854.GF16719@us.ibm.com>
From: Heiko Carstens <heiko.carstens@de.ibm.com>
Exploit rcu_needs_cpu() interface to keep the cpu 'ticking' if necessary.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
---
This one replaces s390-exploit-rcu_soon_pending-interface.patch .
arch/s390/kernel/time.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c
index fea043b..029f099 100644
--- a/arch/s390/kernel/time.c
+++ b/arch/s390/kernel/time.c
@@ -249,18 +249,19 @@ static inline void stop_hz_timer(void)
unsigned long flags;
unsigned long seq, next;
__u64 timer, todval;
+ int cpu = smp_processor_id();
if (sysctl_hz_timer != 0)
return;
- cpu_set(smp_processor_id(), nohz_cpu_mask);
+ cpu_set(cpu, nohz_cpu_mask);
/*
* Leave the clock comparator set up for the next timer
* tick if either rcu or a softirq is pending.
*/
- if (rcu_pending(smp_processor_id()) || local_softirq_pending()) {
- cpu_clear(smp_processor_id(), nohz_cpu_mask);
+ if (rcu_needs_cpu(cpu) || local_softirq_pending()) {
+ cpu_clear(cpu, nohz_cpu_mask);
return;
}
next prev parent reply other threads:[~2006-04-25 12:28 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-24 11:11 [patch] RCU: introduce rcu_soon_pending() interface Heiko Carstens
2006-04-24 23:09 ` Andrew Morton
2006-04-25 5:27 ` Heiko Carstens
2006-04-25 11:46 ` Paul E. McKenney
2006-04-25 11:52 ` Heiko Carstens
2006-04-25 12:08 ` Paul E. McKenney
2006-04-25 12:27 ` [patch] RCU: introduce rcu_needs_cpu() interface Heiko Carstens
[not found] ` <20060426141205.58675763.akpm@osdl.org>
2006-04-27 8:11 ` [patch] RCU: add comments to rcu_pending/rcu_needs_cpu Heiko Carstens
2006-05-01 21:57 ` Paul E. McKenney
2006-05-02 6:35 ` Heiko Carstens
2006-04-25 12:28 ` Heiko Carstens [this message]
2006-04-25 11:23 ` [patch] RCU: introduce rcu_soon_pending() interface Paul E. McKenney
2006-04-25 11:33 ` Martin Schwidefsky
2006-04-25 11:48 ` 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=20060425122818.GC9421@osiris.boeblingen.de.ibm.com \
--to=heiko.carstens@de.ibm.com \
--cc=akpm@osdl.org \
--cc=davem@davemloft.net \
--cc=dipankar@in.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=manfred@colorfullife.com \
--cc=paulmck@us.ibm.com \
--cc=schwidefsky@de.ibm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).