sched: qhmp: consider only the active CPUs in select_best_cpu()
A CPU is marked inactive before it is marked offline during the
hotplug. Placing a task on an inactive but online CPU has the
following problems.
(1) It leads to a suboptimal migration to a fallback CPU later.
(2) unthrottle_offline_cfs_rqs() iterates over rq->leaf_cfs_rq_list
during hotplug to make sure that cfs_rq are not throttled after
a CPU is marked inactive. If we place a task on an inactive CPU
after this phase, there is a possiblity of adding a cfs_rq that
was not present in rq->leaf_cfs_rq_list earlier. If this cfs_rq
is throttled now, the enqueued tasks are not visible during the
task migration. These tasks are left on an offline CPU. When the
runtime is refilled later, we end up sending an IPI to an offline
CPU.
Change-Id: I6c61ad4f534cc55407e8b64a7b429edd9cc9c3fc
Signed-off-by:
Pavankumar Kondeti <pkondeti@codeaurora.org>
Loading
Please register or sign in to comment