Commit 889dfafe836ac9bb711f73d07a4c044cae177c0b

Authored by Oleg Nesterov
Committed by Linus Torvalds
1 parent c8ebce6eeb

[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>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

... ... @@ -1468,7 +1468,7 @@
1468 1468 * the sleep_avg of the parent as well.
1469 1469 */
1470 1470 rq = task_rq_lock(p->parent, &flags);
1471   - if (p->first_time_slice) {
  1471 + if (p->first_time_slice && task_cpu(p) == task_cpu(p->parent)) {
1472 1472 p->parent->time_slice += p->time_slice;
1473 1473 if (unlikely(p->parent->time_slice > task_timeslice(p)))
1474 1474 p->parent->time_slice = task_timeslice(p);