From: Nathan Lynch <nathanl@austin.ibm.com>
To: akpm@osdl.org
Cc: lkml <linux-kernel@vger.kernel.org>,
Rusty Russell <rusty@rustcorp.com.au>,
Ingo Molnar <mingo@elte.hu>
Subject: [PATCH] cpu hotplug fixes for dependent_sleeper and wake_sleeping_dependent
Date: Mon, 30 Aug 2004 04:41:16 -0500 [thread overview]
Message-ID: <1093858876.11274.50.camel@biclops.private.network> (raw)
Hi-
I've reported this issue a couple of times and I think I've finally
tracked it down, though I don't know whether I've come up with the best
fix.
To recap, offlining a cpu with current bk results in the "Aiee, killing
interrupt handler!" panic from do_exit(). This seems to be triggered
only with CONFIG_PREEMPT and CONFIG_SCHED_SMT both enabled. I believe
the problem is that when do_stop() calls schedule(), dependent_sleeper()
drops the "offline" cpu's rq->lock and never reacquires it.
The following seems to work (tested on ppc64). Is there a better way?
Nathan
---
Return early from dependent_sleeper and wake_sleeping_dependent if
this_cpu is offline to avoid releasing this_cpu's rq->lock.
Signed-off-by: Nathan Lynch <nathanl@austin.ibm.com>
---
diff -puN kernel/sched.c~sched-smt-cpu-hotplug-fix kernel/sched.c
--- 2.6-bk/kernel/sched.c~sched-smt-cpu-hotplug-fix 2004-08-30 04:22:49.000000000 -0500
+++ 2.6-bk-nathanl/kernel/sched.c 2004-08-30 04:23:28.000000000 -0500
@@ -2502,7 +2502,7 @@ static inline void wake_sleeping_depende
cpumask_t sibling_map;
int i;
- if (!(sd->flags & SD_SHARE_CPUPOWER))
+ if (!(sd->flags & SD_SHARE_CPUPOWER) || cpu_is_offline(this_cpu))
return;
/*
@@ -2549,7 +2549,7 @@ static inline int dependent_sleeper(int
int ret = 0, i;
task_t *p;
- if (!(sd->flags & SD_SHARE_CPUPOWER))
+ if (!(sd->flags & SD_SHARE_CPUPOWER) || cpu_is_offline(this_cpu))
return 0;
/*
_
next reply other threads:[~2004-08-30 12:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-30 9:41 Nathan Lynch [this message]
2004-08-30 13:29 ` [PATCH] cpu hotplug fixes for dependent_sleeper and wake_sleeping_dependent Ingo Molnar
2004-09-01 23:25 ` Rusty Russell
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=1093858876.11274.50.camel@biclops.private.network \
--to=nathanl@austin.ibm.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rusty@rustcorp.com.au \
/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