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

Commit 15a79957 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "cpufreq: Add a sync limit to cpu-boost"

parents b8b36756 2dd0e605
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -39,6 +39,8 @@ static struct workqueue_struct *boost_rem_wq;
static unsigned int boost_ms;
module_param(boost_ms, uint, 0644);

static unsigned int sync_threshold;
module_param(sync_threshold, uint, 0644);
/*
 * The CPUFREQ_ADJUST notifier is used to override the current policy min to
 * make sure policy min >= boost_min. The cpufreq framework then does the job
@@ -120,8 +122,15 @@ static int boost_mig_sync_thread(void *data)
			continue;
		}

		if (sync_threshold && (dest_policy.cur >= sync_threshold))
			continue;

		cancel_delayed_work_sync(&s->boost_rem);
		if (sync_threshold)
			s->boost_min = min(sync_threshold, src_policy.cur);
		else
			s->boost_min = src_policy.cur;

		/* Force policy re-evaluation to trigger adjust notifier. */
		cpufreq_update_policy(dest_cpu);
		queue_delayed_work_on(s->cpu, boost_rem_wq,