sched: window-stats: update during migration and earlier at wakeup
During migrations accounting needs to be done in set_task_cpu() to subtract the task activity from the source CPU and add it to the destination CPU. This accounting will require that the task's window based load statistics be up to date. Unfortunately, the window-based statistics cannot always be updated in set_task_cpu() because they are already being updated in the wakeup path. We cannot update the statistics solely in the wakeup path because not all wakeups are migrations. Those non-migrating wakeups will not enter set_task_cpu(). To ensure the window-based stats are always updated for both wakeup migrations and regular migrations, they are updated earlier in the wakeup path, and also updated in set_task_cpu if the task is already runnable (this ensures it is not a wakeup migration, but a regular migration). Change-Id: Ib246028741d0be9bb38ce93679d6e6ba25b10756 Signed-off-by:Steve Muckle <smuckle@codeaurora.org> Signed-off-by:
Srivatsa Vaddagiri <vatsa@codeaurora.org>
Loading
Please register or sign in to comment