aboutsummaryrefslogtreecommitdiff
path: root/kernel/sched.c
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@tv-sign.ru>2005-11-04 18:54:30 +0300
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-04 10:45:28 -0800
commit889dfafe836ac9bb711f73d07a4c044cae177c0b (patch)
treeca46672a0d807f82e5d1b13e1b9dff0b561d5f36 /kernel/sched.c
parentc8ebce6eeb1f6f83fd8c0de209f1f7b627220a81 (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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index 340dd238c16..b4f4eb61353 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);