summaryrefslogtreecommitdiffstats
path: root/kernel/sched.c
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@tv-sign.ru>2005-11-04 16:54:30 +0100
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-04 19:45:28 +0100
commit889dfafe836ac9bb711f73d07a4c044cae177c0b (patch)
treeca46672a0d807f82e5d1b13e1b9dff0b561d5f36 /kernel/sched.c
parentMerge master.kernel.org:/home/rmk/linux-2.6-serial (diff)
downloadlinux-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/sched.c')
-rw-r--r--kernel/sched.c2
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);