OSDN Git Service

sched/fair: remove task util from own cpu when placing waking task
authorChris Redpath <chris.redpath@arm.com>
Tue, 28 Feb 2017 17:27:28 +0000 (17:27 +0000)
committerAndres Oportus <andresoportus@google.com>
Fri, 2 Jun 2017 15:01:54 +0000 (08:01 -0700)
commit8865f07600fad56a7fc6b96dc339bbe9a16eb7eb
tree191221d6366d3522ce7e0997bb6e2bf908d5efa2
parent8ac52cbaf41b01baa48fbbe65879734168037f15
sched/fair: remove task util from own cpu when placing waking task

When we place a waking task with find_best_target, we calculate the
existing and new utilisation of each candidate cpu. However, we do
not remove any blocked load resulting from the waking task on the
previous cpu which might cause unnecessary migrations.

Switch to using cpu_util_wake which does this for us, which requires
moving cpu_util_wake a few functions earlier.

Also, we have multiple potential cpu utilization signals here, so
update the necessary bits to allow WALT to work properly (including
not subtracting task util for WALT).

When WALT is in use, cpu utilization is the utilization
in the previous completed window, whilst the task utilization
ignores fully idle windows. There seems to be no way to have a
decently accurate estimate of how much (if any) utilization from
this task remains on the prev cpu.

Instead, just return cpu_util when we're using WALT.

Change-Id: I448203ab98ffb5c020dfb6b218581eef1f5601f7
Reported-by: Patrick Bellasi <patrick.bellasi@arm.com>
Signed-off-by: Chris Redpath <chris.redpath@arm.com>
kernel/sched/fair.c