From: "tip-bot for Amit K. Arora" <aarora@linux.vnet.ibm.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, ego@in.ibm.com,
aarora@linux.vnet.ibm.com, hpa@zytor.com, mingo@redhat.com,
a.p.zijlstra@chello.nl, tj@kernel.org, tglx@linutronix.de,
aarora@in.ibm.com, mingo@elte.hu
Subject: [tip:sched/urgent] sched: Make sure timers have migrated before killing the migration_thread
Date: Mon, 31 May 2010 07:18:52 GMT [thread overview]
Message-ID: <tip-54e88fad223c4e1d94289611a90c7fe3ebe5631b@git.kernel.org> (raw)
In-Reply-To: <20100525132346.GA14986@amitarora.in.ibm.com>
Commit-ID: 54e88fad223c4e1d94289611a90c7fe3ebe5631b
Gitweb: http://git.kernel.org/tip/54e88fad223c4e1d94289611a90c7fe3ebe5631b
Author: Amit K. Arora <aarora@linux.vnet.ibm.com>
AuthorDate: Tue, 25 May 2010 18:53:46 +0530
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Mon, 31 May 2010 08:37:44 +0200
sched: Make sure timers have migrated before killing the migration_thread
Problem: In a stress test where some heavy tests were running along with
regular CPU offlining and onlining, a hang was observed. The system seems
to be hung at a point where migration_call() tries to kill the
migration_thread of the dying CPU, which just got moved to the current
CPU. This migration thread does not get a chance to run (and die) since
rt_throttled is set to 1 on current, and it doesn't get cleared as the
hrtimer which is supposed to reset the rt bandwidth
(sched_rt_period_timer) is tied to the CPU which we just marked dead!
Solution: This patch pushes the killing of migration thread to
"CPU_POST_DEAD" event. By then all the timers (including
sched_rt_period_timer) should have got migrated (along with other
callbacks).
Signed-off-by: Amit Arora <aarora@in.ibm.com>
Signed-off-by: Gautham R Shenoy <ego@in.ibm.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Thomas Gleixner <tglx@linutronix.de>
LKML-Reference: <20100525132346.GA14986@amitarora.in.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
kernel/stop_machine.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/kernel/stop_machine.c b/kernel/stop_machine.c
index b4e7431..70f8d90 100644
--- a/kernel/stop_machine.c
+++ b/kernel/stop_machine.c
@@ -321,7 +321,7 @@ static int __cpuinit cpu_stop_cpu_callback(struct notifier_block *nfb,
#ifdef CONFIG_HOTPLUG_CPU
case CPU_UP_CANCELED:
- case CPU_DEAD:
+ case CPU_POST_DEAD:
{
struct cpu_stop_work *work;
prev parent reply other threads:[~2010-05-31 7:20 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-19 9:05 [PATCH] Make sure timers have migrated before killing migration_thread Amit K. Arora
2010-05-19 9:31 ` Peter Zijlstra
2010-05-19 12:13 ` [PATCH v2] " Amit K. Arora
2010-05-20 7:28 ` Peter Zijlstra
2010-05-23 9:07 ` Mike Galbraith
2010-05-23 9:13 ` Peter Zijlstra
2010-05-24 6:43 ` Amit K. Arora
2010-05-25 20:19 ` Thomas Gleixner
2010-05-26 6:43 ` Peter Zijlstra
2010-05-24 9:59 ` [PATCH] " Amit K. Arora
2010-05-24 13:28 ` Peter Zijlstra
2010-05-24 15:16 ` Srivatsa Vaddagiri
2010-05-24 15:55 ` Peter Zijlstra
2010-05-25 11:31 ` Peter Zijlstra
2010-05-25 12:10 ` Amit K. Arora
2010-05-25 13:23 ` [PATCH v3] " Amit K. Arora
2010-05-25 14:22 ` Peter Zijlstra
2010-05-25 16:27 ` Tejun Heo
2010-05-31 7:18 ` tip-bot for Amit K. Arora [this message]
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=tip-54e88fad223c4e1d94289611a90c7fe3ebe5631b@git.kernel.org \
--to=aarora@linux.vnet.ibm.com \
--cc=a.p.zijlstra@chello.nl \
--cc=aarora@in.ibm.com \
--cc=ego@in.ibm.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=tj@kernel.org \
/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).