[PATCH] sched: update root-domain spans upon departure

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <mingo@...>
Cc: <linux-kernel@...>, <rostedt@...>, <ghaskins@...>
Date: Wednesday, December 5, 2007 - 6:45 pm

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);
 	}

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] sched: update root-domain spans upon departure, Gregory Haskins, (Wed Dec 5, 6:27 pm)
[PATCH] sched: update root-domain spans upon departure, Gregory Haskins, (Wed Dec 5, 6:45 pm)