[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1304256126-26015-24-git-send-email-paulmck@linux.vnet.ibm.com>
Date: Sun, 1 May 2011 06:21:04 -0700
From: "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To: linux-kernel@...r.kernel.org
Cc: mingo@...e.hu, laijs@...fujitsu.com, dipankar@...ibm.com,
akpm@...ux-foundation.org, mathieu.desnoyers@...ymtl.ca,
josh@...htriplett.org, niv@...ibm.com, tglx@...utronix.de,
peterz@...radead.org, rostedt@...dmis.org, Valdis.Kletnieks@...edu,
dhowells@...hat.com, eric.dumazet@...il.com, darren@...art.com,
patches@...aro.org, "Paul E. McKenney" <paul.mckenney@...aro.org>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
Subject: [PATCH tip/core/rcu 24/86] rcu: Switch to this_cpu() primitives
From: Paul E. McKenney <paul.mckenney@...aro.org>
This removes a couple of lines from invoke_rcu_cpu_kthread(), improving
readability.
Reported-by: Christoph Lameter <cl@...ux.com>
Signed-off-by: Paul E. McKenney <paul.mckenney@...aro.org>
Signed-off-by: Paul E. McKenney <paulmck@...ux.vnet.ibm.com>
---
kernel/rcutree.c | 10 +++-------
1 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/kernel/rcutree.c b/kernel/rcutree.c
index ee8442d..03f7148 100644
--- a/kernel/rcutree.c
+++ b/kernel/rcutree.c
@@ -1480,18 +1480,14 @@ static void rcu_process_callbacks(void)
static void invoke_rcu_cpu_kthread(void)
{
unsigned long flags;
- wait_queue_head_t *q;
- int cpu;
local_irq_save(flags);
- cpu = smp_processor_id();
- per_cpu(rcu_cpu_has_work, cpu) = 1;
- if (per_cpu(rcu_cpu_kthread_task, cpu) == NULL) {
+ __this_cpu_write(rcu_cpu_has_work, 1);
+ if (__this_cpu_read(rcu_cpu_kthread_task) == NULL) {
local_irq_restore(flags);
return;
}
- q = &per_cpu(rcu_cpu_wq, cpu);
- wake_up(q);
+ wake_up(&__get_cpu_var(rcu_cpu_wq));
local_irq_restore(flags);
}
--
1.7.3.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists