* [PATCH] sched: update root-domain spans upon departure
@ 2007-12-05 22:27 Gregory Haskins
2007-12-05 22:45 ` Gregory Haskins
0 siblings, 1 reply; 2+ messages in thread
From: Gregory Haskins @ 2007-12-05 22:27 UTC (permalink / raw)
To: mingo; +Cc: linux-kernel, rostedt, ghaskins
Hi Ingo,
This patch should have been rolled into the series I dropped on you
yesterday, but was an oversight. Please apply to sched-devel at your
earliest convenience.
-Greg
-----------------------
sched: update root-domain spans upon departure
We shouldnt leave cpus enabled in the spans if that RQ has left the domain.
Signed-off-by: Gregory Haskins <ghaskins@novell.com>
---
kernel/sched.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/kernel/sched.c b/kernel/sched.c
index 05a9a81..33f8b0c 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -5845,6 +5845,10 @@ static void rq_attach_root(struct rq *rq, struct root_domain *rd)
if (atomic_dec_and_test(&old_rd->refcount))
kfree(old_rd);
+ else {
+ cpu_clear(rq->cpu, old_rd->span);
+ cpu_clear(rq->cpu, old_rd->online);
+ }
}
atomic_inc(&rd->refcount);
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH] sched: update root-domain spans upon departure
2007-12-05 22:27 [PATCH] sched: update root-domain spans upon departure Gregory Haskins
@ 2007-12-05 22:45 ` Gregory Haskins
0 siblings, 0 replies; 2+ messages in thread
From: Gregory Haskins @ 2007-12-05 22:45 UTC (permalink / raw)
To: mingo; +Cc: linux-kernel, rostedt, ghaskins
Hmm...I made a last second "optimization" before sending that patch out and
then realized it was racy. Try this one instead...(sorry for the churn)
-Greg
------------------------------
sched: update root-domain spans upon departure
We shouldnt leave cpus enabled in the spans if that RQ has left the domain.
Signed-off-by: Gregory Haskins <ghaskins@novell.com>
---
kernel/sched.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/kernel/sched.c b/kernel/sched.c
index 05a9a81..02f04bc 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -5843,6 +5843,9 @@ static void rq_attach_root(struct rq *rq, struct root_domain *rd)
class->leave_domain(rq);
}
+ cpu_clear(rq->cpu, old_rd->span);
+ cpu_clear(rq->cpu, old_rd->online);
+
if (atomic_dec_and_test(&old_rd->refcount))
kfree(old_rd);
}
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-12-05 23:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-05 22:27 [PATCH] sched: update root-domain spans upon departure Gregory Haskins
2007-12-05 22:45 ` Gregory Haskins
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®