Re: CFS review

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Al Boldi <a1426z@...>
Cc: Peter Zijlstra <peterz@...>, Mike Galbraith <efault@...>, Andrew Morton <akpm@...>, Linus Torvalds <torvalds@...>, <linux-kernel@...>
Date: Friday, August 24, 2007 - 9:45 am

* Al Boldi <a1426z@gawab.com> wrote:


ok. I think i might finally have found the bug causing this. Could you 
try the fix below, does your webserver thread-startup test work any 
better?

	Ingo

--------------------------->
Subject: sched: fix startup penalty calculation
From: Ingo Molnar <mingo@elte.hu>

fix task startup penalty miscalculation: sysctl_sched_granularity is
unsigned int and wait_runtime is long so we first have to convert it
to long before turning it negative ...

Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 kernel/sched_fair.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux/kernel/sched_fair.c
===================================================================
--- linux.orig/kernel/sched_fair.c
+++ linux/kernel/sched_fair.c
@@ -1048,7 +1048,7 @@ static void task_new_fair(struct rq *rq,
 	 * -granularity/2, so initialize the task with that:
 	 */
 	if (sysctl_sched_features & SCHED_FEAT_START_DEBIT)
-		p->se.wait_runtime = -(sysctl_sched_granularity / 2);
+		p->se.wait_runtime = -((long)sysctl_sched_granularity / 2);
 
 	__enqueue_entity(cfs_rq, se);
 }
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: CFS review, Al Boldi, (Sat Aug 11, 6:44 am)
Re: CFS review, Ingo Molnar, (Sun Aug 12, 12:17 am)
Re: CFS review, Al Boldi, (Sun Aug 12, 11:27 am)
Re: CFS review, Ingo Molnar, (Sun Aug 12, 11:52 am)
Re: CFS review, Al Boldi, (Sun Aug 12, 3:43 pm)
Re: CFS review, Ingo Molnar, (Tue Aug 21, 6:58 am)
Re: CFS review, Al Boldi, (Tue Aug 21, 6:27 pm)
Re: CFS review, Ingo Molnar, (Fri Aug 24, 9:45 am)
Re: CFS review, Al Boldi, (Sat Aug 25, 6:27 pm)
Re: CFS review, Bill Davidsen, (Tue Aug 28, 11:37 pm)
Re: CFS review, Ingo Molnar, (Tue Aug 28, 11:45 pm)
Re: CFS review, Bill Davidsen, (Wed Aug 29, 9:11 am)
Re: CFS review, Ingo Molnar, (Sat Aug 25, 7:15 pm)
Re: CFS review, Bill Davidsen, (Tue Aug 28, 11:42 pm)
Re: CFS review, Al Boldi, (Sun Aug 26, 12:27 pm)
Re: CFS review, Ingo Molnar, (Sun Aug 26, 12:39 pm)
Re: CFS review, Al Boldi, (Mon Aug 27, 12:06 am)
Re: CFS review, Ingo Molnar, (Mon Aug 27, 6:53 am)
Re: CFS review, Al Boldi, (Mon Aug 27, 10:46 am)
Re: CFS review, Ingo Molnar, (Mon Aug 27, 4:41 pm)
Re: CFS review, Al Boldi, (Tue Aug 28, 12:37 am)
Re: CFS review, Ingo Molnar, (Wed Aug 29, 12:18 am)
Re: CFS review, Mike Galbraith, (Wed Aug 29, 12:40 am)
Re: CFS review, Keith Packard, (Wed Aug 29, 12:29 am)
Re: CFS review, Ingo Molnar, (Wed Aug 29, 12:46 am)
Re: CFS review, Keith Packard, (Wed Aug 29, 3:57 am)
Re: CFS review, Ingo Molnar, (Wed Aug 29, 4:04 am)
Re: CFS review, Keith Packard, (Wed Aug 29, 11:57 am)
Re: CFS review, Rene Herman, (Wed Aug 29, 3:56 pm)
Re: CFS review, Chuck Ebbert, (Thu Aug 30, 12:06 pm)
Re: CFS review, Rene Herman, (Thu Aug 30, 12:48 pm)
Re: CFS review, Rene Herman, (Thu Aug 30, 3:05 am)
Re: CFS review, Tilman Sauerbeck, (Fri Aug 31, 2:46 am)
DRM and/or X trouble (was Re: CFS review), Rene Herman, (Fri Aug 31, 6:44 am)
Re: DRM and/or X trouble, Satyam Sharma, (Fri Aug 31, 10:55 am)
Re: CFS review, Ingo Molnar, (Thu Aug 30, 3:20 am)
Re: CFS review, Al Boldi, (Wed Aug 29, 4:53 am)
Re: CFS review, Xavier Bestel, (Tue Aug 28, 3:43 am)
Re: CFS review, Ingo Molnar, (Tue Aug 28, 4:02 am)
Re: CFS review, Willy Tarreau, (Tue Aug 28, 3:19 pm)
Re: CFS review, Ingo Molnar, (Tue Aug 28, 3:55 pm)
Re: CFS review, Linus Torvalds, (Tue Aug 28, 1:05 am)
Re: CFS review, , (Tue Aug 28, 4:46 pm)
Re: CFS review, Al Boldi, (Tue Aug 28, 1:23 am)
Re: CFS review, Linus Torvalds, (Tue Aug 28, 12:34 pm)
Re: CFS review, Ingo Molnar, (Tue Aug 28, 12:45 pm)
Re: CFS review, Al Boldi, (Wed Aug 29, 12:19 am)
Re: CFS review, Ingo Molnar, (Wed Aug 29, 12:53 am)
Re: CFS review, Al Boldi, (Wed Aug 29, 1:58 am)
Re: CFS review, Ingo Molnar, (Wed Aug 29, 2:43 am)
Re: CFS review, Arjan van de Ven, (Tue Aug 28, 12:44 pm)
Re: CFS review, Mike Galbraith, (Tue Aug 28, 3:28 am)
Re: CFS review, Ingo Molnar, (Tue Aug 28, 3:36 am)