Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f52e9f2a authored by Peter Zijlstra's avatar Peter Zijlstra Committed by Pavankumar Kondeti
Browse files

sched/fair: Fix fairness issue on migration



Pavan reported that in the presence of very light tasks (or cgroups)
the placement of migrated tasks can cause severe fairness issues.

The problem is that enqueue_entity() places the task before it updates
time, thereby it can place the task far in the past (remember that
light tasks will shoot virtual time forward at a high speed, so in
relation to the pre-existing light task, we can land far in the past).

This is done because update_curr() needs the current task, and we
might be placing the current task.

The obvious solution is to differentiate between the current and any
other task; placing the current before we update time, and placing any
other task after, such that !curr tasks end up at the current moment
in time, and not in the past.

CRs-Fixed: 911833
Change-Id: I05114cf59e6a50d155ad9db805dcfafffe68adb8
Reported-by: default avatarPavan Kondeti <pkondeti@codeaurora.org>
Tested-by: default avatarPavan Kondeti <pkondeti@codeaurora.org>
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Cc: Ben Segall <bsegall@google.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Matt Fleming <matt@codeblueprint.co.uk>
Cc: Mike Galbraith <umgwanakikbuti@gmail.com>
Cc: Morten Rasmussen <morten.rasmussen@arm.com>
Cc: Paul Turner <pjt@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: byungchul.park@lge.com
Link: http://lkml.kernel.org/r/20160309120403.GK6344@twins.programming.kicks-ass.net


Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
Git-commit: 3a47d5124a957358274e9ca7b115b2f3a914f56d
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git


[pkondeti@codeaurora.org: Ported to QHMP scheduler]
Signed-off-by: default avatarPavankumar Kondeti <pkondeti@codeaurora.org>
parent fbfdd7c9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment