From: Oleg Nesterov Date: Fri, 4 Nov 2005 15:54:30 +0000 (+0300) Subject: [PATCH] improve scheduler fairness a bit X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=889dfafe836ac9bb711f73d07a4c044cae177c0b;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git [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 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);