[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.02.1305031451561.2886@ionos>
Date: Fri, 3 May 2013 15:02:50 +0200 (CEST)
From: Thomas Gleixner <tglx@...utronix.de>
To: Prarit Bhargava <prarit@...hat.com>
cc: LKML <linux-kernel@...r.kernel.org>,
John Stultz <john.stultz@...aro.org>,
Yinghai Lu <yhlu.kernel@...il.com>,
Dave Jones <davej@...emonkey.org.uk>
Subject: Re: [PATCH] NOHZ, check to see if tick device is initialized in IRQ
handling path
On Fri, 3 May 2013, Prarit Bhargava wrote:
> Down a cpu and then bring it back up.
Ahhhh. So the issue is, that we do not clear the per cpu ts->inidle
and friends when we bring the cpu down.
The patch below should address that.
Thanks,
tglx
Index: linux-2.6/kernel/time/tick-common.c
===================================================================
--- linux-2.6.orig/kernel/time/tick-common.c
+++ linux-2.6/kernel/time/tick-common.c
@@ -387,6 +387,7 @@ static int tick_notify(struct notifier_b
tick_shutdown_broadcast_oneshot(dev);
tick_shutdown_broadcast(dev);
tick_shutdown(dev);
+ tick_shutdown_nohz(dev);
break;
case CLOCK_EVT_NOTIFY_SUSPEND:
Index: linux-2.6/kernel/time/tick-internal.h
===================================================================
--- linux-2.6.orig/kernel/time/tick-internal.h
+++ linux-2.6/kernel/time/tick-internal.h
@@ -144,3 +144,9 @@ static inline int tick_device_is_functio
#endif
extern void do_timer(unsigned long ticks);
+
+#ifdef CONFIG_NO_HZ
+extern void tick_shutdown_nohz(unsigned int *cpup);
+#else
+static inline void tick_shutdown_nohz(unsigned int *cpup) { }
+#endif
Index: linux-2.6/kernel/time/tick-sched.c
===================================================================
--- linux-2.6.orig/kernel/time/tick-sched.c
+++ linux-2.6/kernel/time/tick-sched.c
@@ -797,6 +797,13 @@ static inline void tick_check_nohz(int c
}
}
+void tick_shutdown_nohz(unsigned int *cpup)
+{
+ struct tick_sched *ts = &per_cpu(tick_cpu_sched, cpu);
+
+ memset(ts, 0, sizeof(*ts));
+}
+
#else
static inline void tick_nohz_switch_to_nohz(void) { }
--
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