[extra] timers: Use this_cpu_read

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Christoph Lameter
Date: Tuesday, November 30, 2010 - 1:05 pm

Subject: timers: Use this_cpu_read

Eric asked for this.

Signed-off-by: Christoph Lameter <cl@linux.com>

---
 kernel/timer.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Index: linux-2.6/kernel/timer.c
===================================================================
--- linux-2.6.orig/kernel/timer.c	2010-11-30 14:01:41.000000000 -0600
+++ linux-2.6/kernel/timer.c	2010-11-30 14:02:05.000000000 -0600
@@ -1249,7 +1249,7 @@ static unsigned long cmp_next_hrtimer_ev
  */
 unsigned long get_next_timer_interrupt(unsigned long now)
 {
-	struct tvec_base *base = __get_cpu_var(tvec_bases);
+	struct tvec_base *base = __this_cpu_read(tvec_bases);
 	unsigned long expires;

 	spin_lock(&base->lock);
@@ -1292,7 +1292,7 @@ void update_process_times(int user_tick)
  */
 static void run_timer_softirq(struct softirq_action *h)
 {
-	struct tvec_base *base = __get_cpu_var(tvec_bases);
+	struct tvec_base *base = __this_cpu_read(tvec_bases);

 	hrtimer_run_pending();


--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[thisops uV3 00/18] Upgrade of this_cpu_ops V3, Christoph Lameter, (Tue Nov 30, 12:07 pm)
[thisops uV3 01/18] percpucounter: Optimize __percpu_count ..., Christoph Lameter, (Tue Nov 30, 12:07 pm)
[thisops uV3 02/18] vmstat: Optimize zone counter modifica ..., Christoph Lameter, (Tue Nov 30, 12:07 pm)
[thisops uV3 03/18] percpu: Generic support for this_cpu_a ..., Christoph Lameter, (Tue Nov 30, 12:07 pm)
[thisops uV3 04/18] x86: Support for this_cpu_add,sub,dec, ..., Christoph Lameter, (Tue Nov 30, 12:07 pm)
[thisops uV3 05/18] x86: Use this_cpu_inc_return for nmi c ..., Christoph Lameter, (Tue Nov 30, 12:07 pm)
[thisops uV3 06/18] vmstat: Use this_cpu_inc_return for vm ..., Christoph Lameter, (Tue Nov 30, 12:07 pm)
[thisops uV3 07/18] highmem: Use this_cpu_xx_return() oper ..., Christoph Lameter, (Tue Nov 30, 12:07 pm)
[thisops uV3 08/18] Taskstats: Use this_cpu_ops, Christoph Lameter, (Tue Nov 30, 12:07 pm)
[thisops uV3 09/18] fs: Use this_cpu_xx operations in buffer.c, Christoph Lameter, (Tue Nov 30, 12:07 pm)
[thisops uV3 10/18] x86: Use this_cpu_ops to optimize code, Christoph Lameter, (Tue Nov 30, 12:07 pm)
[thisops uV3 11/18] x86: Use this_cpu_ops for current_cpu_ ..., Christoph Lameter, (Tue Nov 30, 12:07 pm)
[thisops uV3 12/18] Core: Replace __get_cpu_var with __thi ..., Christoph Lameter, (Tue Nov 30, 12:07 pm)
[thisops uV3 13/18] drivers: Replace __get_cpu_var with __ ..., Christoph Lameter, (Tue Nov 30, 12:07 pm)
[thisops uV3 14/18] lguest: Use this_cpu_ops, Christoph Lameter, (Tue Nov 30, 12:07 pm)
[thisops uV3 15/18] Xen: Use this_cpu_ops, Christoph Lameter, (Tue Nov 30, 12:07 pm)
[thisops uV3 16/18] kprobes: Use this_cpu_ops, Christoph Lameter, (Tue Nov 30, 12:07 pm)
[thisops uV3 17/18] Connector: Use this_cpu operations, Christoph Lameter, (Tue Nov 30, 12:07 pm)
[thisops uV3 18/18] Fakekey: Simplify speakup_fake_key_pre ..., Christoph Lameter, (Tue Nov 30, 12:07 pm)
Re: [thisops uV3 07/18] highmem: Use this_cpu_xx_return() ..., Christoph Lameter, (Tue Nov 30, 12:26 pm)
Re: [thisops uV3 07/18] highmem: Use this_cpu_xx_return() ..., Christoph Lameter, (Tue Nov 30, 12:53 pm)
[extra] timers: Use this_cpu_read, Christoph Lameter, (Tue Nov 30, 1:05 pm)
Re: [thisops uV3 15/18] Xen: Use this_cpu_ops, Jeremy Fitzhardinge, (Tue Nov 30, 1:53 pm)
Re: [thisops uV3 15/18] Xen: Use this_cpu_ops, Christoph Lameter, (Tue Nov 30, 2:03 pm)
Re: [thisops uV3 08/18] Taskstats: Use this_cpu_ops, Michael Holzheu, (Wed Dec 1, 11:06 am)
Re: [thisops uV3 08/18] Taskstats: Use this_cpu_ops, Christoph Lameter, (Wed Dec 1, 11:13 am)
Re: [thisops uV3 14/18] lguest: Use this_cpu_ops, Rusty Russell, (Mon Dec 6, 12:46 am)
Re: [thisops uV3 08/18] Taskstats: Use this_cpu_ops, Balbir Singh, (Mon Dec 6, 7:32 am)
Re: [thisops uV3 14/18] lguest: Use this_cpu_ops, Christoph Lameter, (Mon Dec 6, 8:54 am)
Re: [thisops uV3 08/18] Taskstats: Use this_cpu_ops, Christoph Lameter, (Tue Dec 7, 7:39 am)
[tip:timers/core] timers: Use this_cpu_read, tip-bot for Christop ..., (Sun Dec 12, 10:41 am)