]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/2.6.24.1/sched-let-nice-tasks-have-smaller-impact.patch
Fixes for 5.10
[thirdparty/kernel/stable-queue.git] / releases / 2.6.24.1 / sched-let-nice-tasks-have-smaller-impact.patch
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
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=utf-8
7 Content-Transfer-Encoding: 8bit
8
9 From: Peter Zijlstra <a.p.zijlstra@chello.nl>
10
11 patch ef9884e6f29bbe1075204f962a00f7533bf7e8f3 in mainline.
12
13 Michel Dänzr has bisected an interactivity problem with
14 plus-reniced tasks back to this commit:
15
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
20
21 sched: another wakeup_granularity fix
22
23 unit mis-match: wakeup_gran was used against a vruntime
24
25 fix this by assymetrically scaling the vtime of positive reniced
26 tasks.
27
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>
32
33 ---
34 kernel/sched_fair.c | 6 +++++-
35 1 file changed, 5 insertions(+), 1 deletion(-)
36
37 --- a/kernel/sched_fair.c
38 +++ b/kernel/sched_fair.c
39 @@ -867,7 +867,11 @@ static void check_preempt_wakeup(struct
40 }
41
42 gran = sysctl_sched_wakeup_granularity;
43 - if (unlikely(se->load.weight != NICE_0_LOAD))
44 + /*
45 + * More easily preempt - nice tasks, while not making
46 + * it harder for + nice tasks.
47 + */
48 + if (unlikely(se->load.weight > NICE_0_LOAD))
49 gran = calc_delta_fair(gran, &se->load);
50
51 if (pse->vruntime + gran < se->vruntime)