core_ctl: Fix an issue where CPUs are left un-isolated for long time

When SCHED_CORE_ROTATE config is enabled, the CPUs that are
eligible for isolation are kept rotated for every system
suspend and resume cycle. cluster->set_cur holds this eligible
mask. It is also reconfigured when min_cpus tunable is changed.

The CPUs that are part of this eligible mask are only isolated
in try_to_isolate(). A CPU that is part of this mask but is busy
at that time left isolated. Since the new need is same as the
last need, eval_need() does not kick core_ctl thread next time
when the CPU becomes idle. To fix this issue, kick the core_ctl
thread when there more active CPUs than currently needed. The kicks
are rate limited by an existing tunable called offline_delay_ms.

Change-Id: I9d3815c6c6bede4b93a708ae6edb15f94d296399
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
1 file changed