diff options
author | Oleg Nesterov <oleg@tv-sign.ru> | 2005-11-04 10:54:30 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-04 13:45:28 -0500 |
commit | 889dfafe836ac9bb711f73d07a4c044cae177c0b (patch) | |
tree | ca46672a0d807f82e5d1b13e1b9dff0b561d5f36 /kernel/sched.c | |
parent | c8ebce6eeb1f6f83fd8c0de209f1f7b627220a81 (diff) |
[PATCH] improve scheduler fairness a bit
Do not transfer remaining time slice to another cpu on process exit.
Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel/sched.c')
-rw-r--r-- | kernel/sched.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index 340dd238c16d..b4f4eb613537 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -1468,7 +1468,7 @@ void fastcall sched_exit(task_t *p) | |||
1468 | * the sleep_avg of the parent as well. | 1468 | * the sleep_avg of the parent as well. |
1469 | */ | 1469 | */ |
1470 | rq = task_rq_lock(p->parent, &flags); | 1470 | rq = task_rq_lock(p->parent, &flags); |
1471 | if (p->first_time_slice) { | 1471 | if (p->first_time_slice && task_cpu(p) == task_cpu(p->parent)) { |
1472 | p->parent->time_slice += p->time_slice; | 1472 | p->parent->time_slice += p->time_slice; |
1473 | if (unlikely(p->parent->time_slice > task_timeslice(p))) | 1473 | if (unlikely(p->parent->time_slice > task_timeslice(p))) |
1474 | p->parent->time_slice = task_timeslice(p); | 1474 | p->parent->time_slice = task_timeslice(p); |