]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] improve scheduler fairness a bit
authorOleg Nesterov <oleg@tv-sign.ru>
Fri, 4 Nov 2005 15:54:30 +0000 (18:54 +0300)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 4 Nov 2005 18:45:28 +0000 (10:45 -0800)
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>
kernel/sched.c

index 340dd238c16da8044acf88527e3c07feb9472c20..b4f4eb6135372d258d51ded475ff68c5517c2614 100644 (file)
@@ -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);