Commit 889dfafe authored by Oleg Nesterov's avatar Oleg Nesterov Committed by Linus Torvalds

[PATCH] improve scheduler fairness a bit

Do not transfer remaining time slice to another cpu on process exit.
Signed-off-by: default avatarOleg Nesterov <oleg@tv-sign.ru>
Acked-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent c8ebce6e
...@@ -1468,7 +1468,7 @@ void fastcall sched_exit(task_t *p) ...@@ -1468,7 +1468,7 @@ void fastcall sched_exit(task_t *p)
* the sleep_avg of the parent as well. * the sleep_avg of the parent as well.
*/ */
rq = task_rq_lock(p->parent, &flags); 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; p->parent->time_slice += p->time_slice;
if (unlikely(p->parent->time_slice > task_timeslice(p))) if (unlikely(p->parent->time_slice > task_timeslice(p)))
p->parent->time_slice = task_timeslice(p); p->parent->time_slice = task_timeslice(p);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment