1 From ef9884e6f29bbe1075204f962a00f7533bf7e8f3 Mon Sep 17 00:00:00 2001
2 From: Peter Zijlstra <a.p.zijlstra@chello.nl>
3 Date: Thu, 31 Jan 2008 22:45:22 +0100
4 Subject: sched: let +nice tasks have smaller impact
6 Content-Type: text/plain; charset=utf-8
7 Content-Transfer-Encoding: 8bit
9 From: Peter Zijlstra <a.p.zijlstra@chello.nl>
11 patch ef9884e6f29bbe1075204f962a00f7533bf7e8f3 in mainline.
13 Michel Dänzr has bisected an interactivity problem with
14 plus-reniced tasks back to this commit:
16 810e95ccd58d91369191aa4ecc9e6d4a10d8d0c8 is first bad commit
17 commit 810e95ccd58d91369191aa4ecc9e6d4a10d8d0c8
18 Author: Peter Zijlstra <a.p.zijlstra@chello.nl>
19 Date: Mon Oct 15 17:00:14 2007 +0200
21 sched: another wakeup_granularity fix
23 unit mis-match: wakeup_gran was used against a vruntime
25 fix this by assymetrically scaling the vtime of positive reniced
28 Bisected-by: Michel Dänzer <michel@tungstengraphics.com>
29 Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
30 Signed-off-by: Ingo Molnar <mingo@elte.hu>
31 Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
34 kernel/sched_fair.c | 6 +++++-
35 1 file changed, 5 insertions(+), 1 deletion(-)
37 --- a/kernel/sched_fair.c
38 +++ b/kernel/sched_fair.c
39 @@ -867,7 +867,11 @@ static void check_preempt_wakeup(struct
42 gran = sysctl_sched_wakeup_granularity;
43 - if (unlikely(se->load.weight != NICE_0_LOAD))
45 + * More easily preempt - nice tasks, while not making
46 + * it harder for + nice tasks.
48 + if (unlikely(se->load.weight > NICE_0_LOAD))
49 gran = calc_delta_fair(gran, &se->load);
51 if (pse->vruntime + gran < se->vruntime)