Re: [git] CFS-devel, latest code

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Srivatsa Vaddagiri <vatsa@...>
Cc: Mike Galbraith <efault@...>, <linux-kernel@...>, Peter Zijlstra <a.p.zijlstra@...>, Dhaval Giani <dhaval@...>, Dmitry Adamushko <dmitry.adamushko@...>, Andrew Morton <akpm@...>
Date: Tuesday, September 25, 2007 - 6:10 am

* Ingo Molnar <mingo@elte.hu> wrote:


hm, i tried the naive patch. In theory the vruntime of all scheduling 
entities should be 'compatible' and comparable (that's the point behind 
using vruntime - the fairness engine drives each vruntime forward and 
tries to balance them).

So the patch below just removes the is_same_group() condition. But i can 
still see bad (and obvious) latencies with Mike's 2-hogs test:

 taskset 01 perl -e 'while (1) {}' &
 nice -19 taskset 02 perl -e 'while (1) {}' &

So something's amiss.

	Ingo

------------------->
Subject: sched: group scheduler wakeup latency fix
From: Ingo Molnar <mingo@elte.hu>

group scheduler wakeup latency fix.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 kernel/sched_fair.c |    9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

Index: linux/kernel/sched_fair.c
===================================================================
--- linux.orig/kernel/sched_fair.c
+++ linux/kernel/sched_fair.c
@@ -785,6 +785,7 @@ static void check_preempt_wakeup(struct 
 {
 	struct task_struct *curr = rq->curr;
 	struct cfs_rq *cfs_rq = task_cfs_rq(curr);
+	s64 delta;
 
 	if (unlikely(rt_prio(p->prio))) {
 		update_rq_clock(rq);
@@ -792,12 +793,10 @@ static void check_preempt_wakeup(struct 
 		resched_task(curr);
 		return;
 	}
-	if (is_same_group(curr, p)) {
-		s64 delta = curr->se.vruntime - p->se.vruntime;
+	delta = curr->se.vruntime - p->se.vruntime;
 
-		if (delta > (s64)sysctl_sched_wakeup_granularity)
-			resched_task(curr);
-	}
+	if (delta > (s64)sysctl_sched_wakeup_granularity)
+		resched_task(curr);
 }
 
 static struct task_struct *pick_next_task_fair(struct rq *rq)
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[git] CFS-devel, latest code, Ingo Molnar, (Mon Sep 24, 5:45 pm)
Re: [git] CFS-devel, latest code, Andrew Morton, (Tue Sep 25, 3:41 am)
Re: [git] CFS-devel, latest code, Srivatsa Vaddagiri, (Tue Sep 25, 4:43 am)
Re: [git] CFS-devel, latest code, Ingo Molnar, (Tue Sep 25, 7:00 am)
Re: [git] CFS-devel, latest code, Andrew Morton, (Tue Sep 25, 4:48 am)
Re: [git] CFS-devel, latest code, S.Çağlar, (Tue Sep 25, 2:50 am)
Re: [git] CFS-devel, latest code, Ingo Molnar, (Tue Sep 25, 5:17 am)
Re: [git] CFS-devel, latest code, Mike Galbraith, (Tue Sep 25, 2:10 am)
Re: [git] CFS-devel, latest code, Mike Galbraith, (Tue Sep 25, 3:35 am)
Re: [git] CFS-devel, latest code, Mike Galbraith, (Tue Sep 25, 4:33 am)
Re: [git] CFS-devel, latest code, Ingo Molnar, (Tue Sep 25, 5:13 am)
Re: [git] CFS-devel, latest code, Srivatsa Vaddagiri, (Tue Sep 25, 5:44 am)
Re: [git] CFS-devel, latest code, Ingo Molnar, (Tue Sep 25, 5:40 am)
Re: [git] CFS-devel, latest code, Ingo Molnar, (Tue Sep 25, 6:10 am)
Re: [git] CFS-devel, latest code, Srivatsa Vaddagiri, (Tue Sep 25, 6:28 am)
Re: [git] CFS-devel, latest code, Mike Galbraith, (Tue Sep 25, 8:28 am)
Re: [git] CFS-devel, latest code, Mike Galbraith, (Tue Sep 25, 8:54 am)
Re: [git] CFS-devel, latest code, Ingo Molnar, (Tue Sep 25, 6:36 am)
Re: [git] CFS-devel, latest code, Srivatsa Vaddagiri, (Tue Sep 25, 8:51 am)
Re: [git] CFS-devel, latest code, Mike Galbraith, (Tue Sep 25, 9:35 am)
Re: [git] CFS-devel, latest code, Srivatsa Vaddagiri, (Tue Sep 25, 10:07 am)
Re: [git] CFS-devel, latest code, Ingo Molnar, (Tue Sep 25, 7:33 am)
Re: [git] CFS-devel, latest code, Srivatsa Vaddagiri, (Tue Sep 25, 10:48 am)
Re: [git] CFS-devel, latest code, Mike Galbraith, (Tue Sep 25, 5:17 am)
Re: [git] CFS-devel, latest code, Ingo Molnar, (Tue Sep 25, 5:47 am)
Re: [git] CFS-devel, latest code, Bill Davidsen, (Fri Sep 28, 5:46 pm)
Re: [git] CFS-devel, latest code, Mike Galbraith, (Wed Sep 26, 4:04 am)
Re: [git] CFS-devel, latest code, Mike Galbraith, (Tue Sep 25, 6:02 am)
Re: [git] CFS-devel, latest code, Srivatsa Vaddagiri, (Tue Sep 25, 4:53 am)
Re: [git] CFS-devel, latest code, Mike Galbraith, (Tue Sep 25, 5:12 am)
Re: [git] CFS-devel, latest code, Srivatsa Vaddagiri, (Tue Sep 25, 5:11 am)
Re: [git] CFS-devel, latest code, Mike Galbraith, (Tue Sep 25, 5:15 am)
Re: [git] CFS-devel, latest code, Daniel Walker, (Mon Sep 24, 8:08 pm)
Re: [git] CFS-devel, latest code, Ingo Molnar, (Tue Sep 25, 2:45 am)
Re: [git] CFS-devel, latest code, Daniel Walker, (Tue Sep 25, 11:17 am)
Re: [git] CFS-devel, latest code, Andrew Morton, (Mon Sep 24, 5:55 pm)
Re: [git] CFS-devel, latest code, Ingo Molnar, (Mon Sep 24, 5:59 pm)