diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2008-01-31 22:45:22 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-02-08 11:46:29 -0800 |
commit | 818b7bc903fc96665eb6c885b1180e3268756d33 (patch) | |
tree | d8e3c75c36a935c61bd67cd50a1ffea9e740c78a | |
parent | 5df1d0f87854e9bcd6b32ad0d2e1f8676dbe9ea6 (diff) | |
download | lwn-818b7bc903fc96665eb6c885b1180e3268756d33.tar.gz lwn-818b7bc903fc96665eb6c885b1180e3268756d33.zip |
sched: let +nice tasks have smaller impact
patch ef9884e6f29bbe1075204f962a00f7533bf7e8f3 in mainline.
Michel Dänzr has bisected an interactivity problem with
plus-reniced tasks back to this commit:
810e95ccd58d91369191aa4ecc9e6d4a10d8d0c8 is first bad commit
commit 810e95ccd58d91369191aa4ecc9e6d4a10d8d0c8
Author: Peter Zijlstra <a.p.zijlstra@chello.nl>
Date: Mon Oct 15 17:00:14 2007 +0200
sched: another wakeup_granularity fix
unit mis-match: wakeup_gran was used against a vruntime
fix this by assymetrically scaling the vtime of positive reniced
tasks.
Bisected-by: Michel Dänzer <michel@tungstengraphics.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | kernel/sched_fair.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c index da7c061e7206..94e88beb15f3 100644 --- a/kernel/sched_fair.c +++ b/kernel/sched_fair.c @@ -867,7 +867,11 @@ static void check_preempt_wakeup(struct rq *rq, struct task_struct *p) } gran = sysctl_sched_wakeup_granularity; - if (unlikely(se->load.weight != NICE_0_LOAD)) + /* + * More easily preempt - nice tasks, while not making + * it harder for + nice tasks. + */ + if (unlikely(se->load.weight > NICE_0_LOAD)) gran = calc_delta_fair(gran, &se->load); if (pse->vruntime + gran < se->vruntime) |