Re: [PATCH 0/3] sched: newidle and RT wake-buddy fixes

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Ingo Molnar <mingo@...>
Cc: <rostedt@...>, <peterz@...>, <npiggin@...>, <linux-kernel@...>, <linux-rt-users@...>
Date: Monday, June 30, 2008 - 1:16 pm

>>> On Mon, Jun 30, 2008 at  9:15 AM, in message <20080630131511.GA7506@elte.hu>,
Ingo Molnar <mingo@elte.hu> wrote: 


I may have found the issue:  It looks like the hunk that initially disables interrupts in load_balance_newidle() was inadvertently applied to load_balance() instead during the
merge to linux-tip.  If you fold the following patch into my original patch, it should set
things right again.

-----

sched: fix merge problem with newidle enhancement patch

From: Gregory Haskins <ghaskins@novell.com>

commit cc8160c56843201891766660e3816d2e546c1b17 introduces a locking
enhancement for newidle.  However, one hunk misapplied to load_balance
instead of load_balance_newidle.  This fixes the issue.

Signed-off-by: Gregory Haskins <ghaskins@novell.com>
---

 kernel/sched.c |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/kernel/sched.c b/kernel/sched.c
index f35d73c..f36406f 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -3459,15 +3459,6 @@ static int load_balance(int this_cpu, struct rq *this_rq,
 
 	cpus_setall(*cpus);
 
-	schedstat_inc(sd, lb_count[CPU_NEWLY_IDLE]);
-
-	/*
-	 * We are in a preempt-disabled section, so dropping the lock/irq
-	 * here simply means that other cores may acquire the lock,
-	 * and interrupts may occur.
-	 */
-	spin_unlock_irq(&this_rq->lock);
-
 	/*
 	 * When power savings policy is enabled for the parent domain, idle
 	 * sibling can pick up load irrespective of busy siblings. In this case,
@@ -3630,6 +3621,15 @@ load_balance_newidle(int this_cpu, struct rq *this_rq, struct sched_domain *sd,
 
 	cpus_setall(*cpus);
 
+	schedstat_inc(sd, lb_count[CPU_NEWLY_IDLE]);
+
+	/*
+	 * We are in a preempt-disabled section, so dropping the lock/irq
+	 * here simply means that other cores may acquire the lock,
+	 * and interrupts may occur.
+	 */
+	spin_unlock_irq(&this_rq->lock);
+
 	/*
 	 * When power savings policy is enabled for the parent domain, idle
 	 * sibling can pick up load irrespective of busy siblings. In this case,

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

Messages in current thread:
[PATCH 0/3] sched: newidle and RT wake-buddy fixes, Gregory Haskins, (Fri Jun 27, 4:29 pm)
Re: [PATCH 0/3] sched: newidle and RT wake-buddy fixes, Ingo Molnar, (Mon Jun 30, 9:15 am)
Re: [PATCH 0/3] sched: newidle and RT wake-buddy fixes, Gregory Haskins, (Mon Jun 30, 1:16 pm)
Re: [PATCH 0/3] sched: newidle and RT wake-buddy fixes, Ingo Molnar, (Thu Jul 3, 10:41 am)
Re: [PATCH 0/3] sched: newidle and RT wake-buddy fixes, Ingo Molnar, (Thu Jul 3, 11:12 am)
Re: [PATCH 0/3] sched: newidle and RT wake-buddy fixes, Gregory Haskins, (Tue Jul 8, 12:45 pm)
Re: [PATCH 0/3] sched: newidle and RT wake-buddy fixes, Gregory Haskins, (Tue Jul 8, 8:38 am)
Re: [PATCH 0/3] sched: newidle and RT wake-buddy fixes, Ingo Molnar, (Mon Jun 30, 2:10 pm)
Re: [PATCH 0/3] sched: newidle and RT wake-buddy fixes, Gregory Haskins, (Mon Jun 30, 10:41 am)
Re: [PATCH 0/3] sched: newidle and RT wake-buddy fixes, Steven Rostedt, (Mon Jun 30, 11:01 am)
Re: [PATCH 0/3] sched: newidle and RT wake-buddy fixes, Gregory Haskins, (Mon Jun 30, 7:20 am)
Re: [PATCH 0/3] sched: newidle and RT wake-buddy fixes, Peter Zijlstra, (Fri Jun 27, 4:51 pm)
Re: [PATCH 0/3] sched: newidle and RT wake-buddy fixes, Ingo Molnar, (Mon Jun 30, 8:56 am)
[PATCH 3/3] sched: add avg-overlap support to RT tasks, Gregory Haskins, (Fri Jun 27, 4:30 pm)