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

Commit 2e88529c authored by Quentin Perret's avatar Quentin Perret
Browse files

ANDROID: sched: Introduce sysctl_sched_cstate_aware



Introduce a new sysctl for this option, 'sched_cstate_aware'.
When this is enabled, the scheduler can make use of the idle state
indexes in order to break the tie between potential CPU candidates.

This patch is based on 7f6fb825d6bc ("ANDROID: sched: EAS: take cstate
into account when selecting idle core") from android-4.14. All the
credits goes to the authors.

Change-Id: Ia076cf32faff91e90905291fa6f7924dc3dd6458
Signed-off-by: default avatarQuentin Perret <quentin.perret@arm.com>
parent 3e63fb2c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ enum { sysctl_hung_task_timeout_secs = 0 };

extern unsigned int sysctl_sched_latency;
extern unsigned int sysctl_sched_min_granularity;
extern unsigned int sysctl_sched_cstate_aware;
extern unsigned int sysctl_sched_wakeup_granularity;
extern unsigned int sysctl_sched_child_runs_first;

+5 −0
Original line number Diff line number Diff line
@@ -40,6 +40,11 @@
unsigned int sysctl_sched_latency			= 6000000ULL;
unsigned int normalized_sysctl_sched_latency		= 6000000ULL;

/*
 * Enable/disable using cstate knowledge in idle sibling selection
 */
unsigned int sysctl_sched_cstate_aware = 1;

/*
 * The initial- and re-scaling of tunables is configurable
 *
+7 −0
Original line number Diff line number Diff line
@@ -320,6 +320,13 @@ static struct ctl_table kern_table[] = {
		.proc_handler	= proc_dointvec,
	},
#ifdef CONFIG_SCHED_DEBUG
	{
		.procname       = "sched_cstate_aware",
		.data           = &sysctl_sched_cstate_aware,
		.maxlen         = sizeof(unsigned int),
		.mode           = 0644,
		.proc_handler   = proc_dointvec,
	},
	{
		.procname	= "sched_min_granularity_ns",
		.data		= &sysctl_sched_min_granularity,