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

Commit 95f3735c authored by Pavankumar Kondeti's avatar Pavankumar Kondeti Committed by Satya Durga Srinivasu Prabhala
Browse files

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: default avatarPavankumar Kondeti <pkondeti@codeaurora.org>
parent e15f923a
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -761,7 +761,12 @@ static bool eval_need(struct cluster_data *cluster)
	if (new_need > cluster->active_cpus) {
		ret = 1;
	} else {
		if (new_need == last_need) {
		/*
		 * When there is no change in need and there are no more
		 * active CPUs than currently needed, just update the
		 * need time stamp and return.
		 */
		if (new_need == last_need && new_need == cluster->active_cpus) {
			cluster->need_ts = now;
			spin_unlock_irqrestore(&state_lock, flags);
			return 0;