From: Thomas Gleixner <tglx@linutronix.de>
To: Prarit Bhargava <prarit@redhat.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
John Stultz <john.stultz@linaro.org>,
Yinghai Lu <yhlu.kernel@gmail.com>,
Dave Jones <davej@codemonkey.org.uk>
Subject: Re: [PATCH] NOHZ, check to see if tick device is initialized in IRQ handling path
Date: Fri, 3 May 2013 15:02:50 +0200 (CEST) [thread overview]
Message-ID: <alpine.LFD.2.02.1305031451561.2886@ionos> (raw)
In-Reply-To: <5183AECF.4070709@redhat.com>
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) { }
next prev parent reply other threads:[~2013-05-03 13:02 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-30 12:36 Prarit Bhargava
2013-05-02 22:51 ` Tony Luck
2013-05-02 22:56 ` Thomas Gleixner
2013-05-03 8:10 ` Thomas Gleixner
2013-05-03 12:34 ` Prarit Bhargava
2013-05-03 13:02 ` Thomas Gleixner [this message]
2013-05-03 13:43 ` Prarit Bhargava
2013-05-05 6:20 ` [tip:timers/urgent] tick: Cleanup NOHZ per cpu data on cpu down tip-bot for Thomas Gleixner
2013-05-05 19:54 ` Prarit Bhargava
2013-05-06 8:48 ` Thomas Gleixner
2013-05-05 12:48 ` tip-bot for Thomas Gleixner
2013-05-05 14:14 ` tip-bot for Thomas Gleixner
2013-05-12 10:27 ` tip-bot for Thomas Gleixner
2013-05-13 14:51 ` Prarit Bhargava
2013-05-13 19:10 ` Thomas Gleixner
2013-05-14 13:48 ` Prarit Bhargava
-- strict thread matches above, loose matches on Subject: below --
2013-04-16 1:20 [PATCH] NOHZ, check to see if tick device is initialized in IRQ handling path Prarit Bhargava
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=alpine.LFD.2.02.1305031451561.2886@ionos \
--to=tglx@linutronix.de \
--cc=davej@codemonkey.org.uk \
--cc=john.stultz@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=prarit@redhat.com \
--cc=yhlu.kernel@gmail.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
Powered by JetHome