From: Oleg Nesterov Date: Fri, 4 Nov 2005 15:54:30 +0000 (+0300) Subject: [PATCH] improve scheduler fairness a bit X-Git-Tag: v2.6.15-rc1~452^2~23 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=889dfafe836ac9bb711f73d07a4c044cae177c0b;p=linux-2.6 [PATCH] improve scheduler fairness a bit Do not transfer remaining time slice to another cpu on process exit. Signed-off-by: Oleg Nesterov Acked-by: Ingo Molnar Signed-off-by: Linus Torvalds --- diff --git a/kernel/sched.c b/kernel/sched.c index 340dd238c1..b4f4eb6135 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);