diff options
author | Oleg Nesterov <oleg@tv-sign.ru> | 2005-11-04 16:54:30 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-04 19:45:28 +0100 |
commit | 889dfafe836ac9bb711f73d07a4c044cae177c0b (patch) | |
tree | ca46672a0d807f82e5d1b13e1b9dff0b561d5f36 /kernel | |
parent | Merge master.kernel.org:/home/rmk/linux-2.6-serial (diff) | |
download | linux-889dfafe836ac9bb711f73d07a4c044cae177c0b.tar.xz linux-889dfafe836ac9bb711f73d07a4c044cae177c0b.zip |
[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')
-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) * the sleep_avg of the parent as well. */ rq = task_rq_lock(p->parent, &flags); - if (p->first_time_slice) { + if (p->first_time_slice && task_cpu(p) == task_cpu(p->parent)) { p->parent->time_slice += p->time_slice; if (unlikely(p->parent->time_slice > task_timeslice(p))) p->parent->time_slice = task_timeslice(p); |