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

Commit 650cf424 authored by Joonwoo Park's avatar Joonwoo Park
Browse files

sched: eliminate sched_enable_power_aware knob and parameter



Kill unused scheduler knob and parameter sched_enable_power_aware.  HMP
scheduler always take into account power cost for placing task.

Change-Id: Ib26a21df9b903baac26c026862b0a41b4a8834f3
Signed-off-by: default avatarJoonwoo Park <joonwoop@codeaurora.org>
parent f2121086
Loading
Loading
Loading
Loading
+17 −31
Original line number Diff line number Diff line
@@ -1049,21 +1049,7 @@ high-performance CPU).

See also notes on 'cpu.upmigrate_discourage' tunable.

*** 7.6 sched_enable_power_aware

Appears at: /proc/sys/kernel/sched_enable_power_aware

Default value: 0

Controls whether or not per-CPU power values are used in determining
task placement. If this is disabled, tasks are simply placed on the
least capacity CPU that will adequately meet the task's needs as
determined by the task load tracking mechanism. If this is enabled,
after a set of CPUs are determined which will meet the task's
performance needs, a CPU is selected which is reported to have the
lowest power consumption at that time.

*** 7.7 sched_ravg_hist_size
*** 7.6 sched_ravg_hist_size

Appears at: /proc/sys/kernel/sched_ravg_hist_size

@@ -1072,7 +1058,7 @@ Default value: 5
This tunable controls the number of samples used from task's sum_history[]
array for determination of its demand.

*** 7.8 sched_window_stats_policy
*** 7.7 sched_window_stats_policy

Appears at: /proc/sys/kernel/sched_window_stats_policy

@@ -1091,7 +1077,7 @@ Possible values for this tunable are:
   samples), where M = sysctl_sched_ravg_hist_size
3. Use average of first M samples, where M = sysctl_sched_ravg_hist_size

*** 7.9 sched_ravg_window
*** 7.8 sched_ravg_window

Appears at: kernel command line argument

@@ -1102,7 +1088,7 @@ tracking. By default each window is 10ms long. This quantity must
currently be set at boot time on the kernel command line (or the
default value of 10ms can be used).

*** 7.10 RAVG_HIST_SIZE
*** 7.9 RAVG_HIST_SIZE

Appears at: compile time only (see RAVG_HIST_SIZE in include/linux/sched.h)

@@ -1113,7 +1099,7 @@ tracking mechanism maintains per task. If default values are used for
both this and sched_ravg_window then a total of 50ms of task history
would be maintained in 5 10ms windows.

*** 7.11 sched_migration_fixup
*** 7.10 sched_migration_fixup

Appears at: /proc/sys/kernel/sched_migration_fixup

@@ -1122,7 +1108,7 @@ Default value: 1
This controls whether a cpu's busy time counters are adjusted during task
migration.

*** 7.12 sched_freq_inc_notify
*** 7.11 sched_freq_inc_notify

Appears at: /proc/sys/kernel/sched_freq_inc_notify

@@ -1134,7 +1120,7 @@ exceeds sched_freq_inc_notify, where freq_required is the frequency calculated
by scheduler to meet current task demand. Note that sched_freq_inc_notify is
specified in kHz units.

*** 7.13 sched_freq_dec_notify
*** 7.12 sched_freq_dec_notify

Appears at: /proc/sys/kernel/sched_freq_dec_notify

@@ -1147,7 +1133,7 @@ exceeds sched_freq_dec_notify, where freq_required is the frequency calculated
by scheduler to meet current task demand. Note that sched_freq_dec_notify is
specified in kHz units.

*** 7.14 sched_heavy_task
*** 7.13 sched_heavy_task

Appears at: /proc/sys/kernel/sched_heavy_task

@@ -1159,7 +1145,7 @@ comparison. Scheduler will request a raise in cpu frequency when heavy tasks
wakeup after at least one window of sleep, where window size is defined by
sched_ravg_window. Value 0 will disable this feature.

*** 7.15 sched_cpu_high_irqload
*** 7.14 sched_cpu_high_irqload

Appears at: /proc/sys/kernel/sched_cpu_high_irqload

@@ -1177,7 +1163,7 @@ longer eligible for placement. This will affect the task placement logic
described above, causing the scheduler to try and steer tasks away from
the CPU.

*** 7.16 cpu.upmigrate_discourage
*** 7.15 cpu.upmigrate_discourage

Default value : 0

@@ -1193,7 +1179,7 @@ overcommitted scenario. See notes on sched_spill_nr_run and sched_spill_load for
how overcommitment threshold is defined and also notes on
'sched_upmigrate_min_nice' tunable.

*** 7.17 sched_static_cpu_pwr_cost
*** 7.16 sched_static_cpu_pwr_cost

Default value: 0

@@ -1208,7 +1194,7 @@ within a cluster and possibly have differing value between clusters as
needed.


*** 7.18 sched_static_cluster_pwr_cost
*** 7.17 sched_static_cluster_pwr_cost

Default value: 0

@@ -1219,7 +1205,7 @@ power mode. It ignores the actual D-state that a cluster may be in and assumes
the worst case power cost of the highest D-state. It is means of biasing task
placement away from idle clusters when necessary.

*** 7.19 sched_early_detection_duration
*** 7.18 sched_early_detection_duration

Default value: 9500000

@@ -1230,7 +1216,7 @@ tick for it to be eligible for the scheduler's early detection feature
under scheduler boost. For more information on the feature itself please
refer to section 5.2.1.

*** 7.20 sched_restrict_cluster_spill
*** 7.19 sched_restrict_cluster_spill

Default value: 0

@@ -1249,7 +1235,7 @@ CPU across all clusters. When this tunable is enabled, the RT tasks are
restricted to the lowest possible power cluster.


*** 7.21 sched_downmigrate
*** 7.20 sched_downmigrate

Appears at: /proc/sys/kernel/sched_downmigrate

@@ -1262,7 +1248,7 @@ its demand *in reference to the power-efficient cpu* drops less than 60%
(sched_downmigrate).


*** 7.22 sched_small_wakee_task_load
*** 7.21 sched_small_wakee_task_load

Appears at: /proc/sys/kernel/sched_small_wakee_task_load

@@ -1274,7 +1260,7 @@ categorized as small wakee tasks. Scheduler places small wakee tasks on the
waker's cluster.


*** 7.23 sched_big_waker_task_load
*** 7.22 sched_big_waker_task_load

Appears at: /proc/sys/kernel/sched_big_waker_task_load

+1 −1
Original line number Diff line number Diff line
@@ -46,7 +46,6 @@ extern unsigned int sysctl_sched_ravg_hist_size;
extern unsigned int sysctl_sched_cpu_high_irqload;
extern unsigned int sysctl_sched_migration_fixup;
extern unsigned int sysctl_sched_heavy_task_pct;
extern unsigned int sysctl_sched_enable_power_aware;

#if defined(CONFIG_SCHED_FREQ_INPUT) || defined(CONFIG_SCHED_HMP)
extern unsigned int sysctl_sched_init_task_load_pct;
@@ -75,6 +74,7 @@ extern unsigned int sysctl_sched_small_task_pct;
extern unsigned int sysctl_sched_restrict_tasks_spread;
extern unsigned int sysctl_sched_account_wait_time;
extern unsigned int sysctl_sched_freq_account_wait_time;
extern unsigned int sysctl_sched_enable_power_aware;
#else
extern unsigned int sysctl_sched_select_prev_cpu_us;
extern unsigned int sysctl_sched_enable_colocation;
+1 −14
Original line number Diff line number Diff line
@@ -1573,19 +1573,6 @@ static int __init set_sched_enable_hmp(char *str)

early_param("sched_enable_hmp", set_sched_enable_hmp);

static int __init set_sched_enable_power_aware(char *str)
{
	int enable_power_aware = 0;

	get_option(&str, &enable_power_aware);

	sysctl_sched_enable_power_aware = !!enable_power_aware;

	return 0;
}

early_param("sched_enable_power_aware", set_sched_enable_power_aware);

static inline int got_boost_kick(void)
{
	int cpu = smp_processor_id();
@@ -2659,7 +2646,7 @@ int sched_update_freq_max_load(const cpumask_t *cpumask)
	u32 hfreq;
	int hpct;

	if (!per_cpu_info || !sysctl_sched_enable_power_aware)
	if (!per_cpu_info)
		return 0;

	spin_lock_irqsave(&freq_max_load_lock, flags);
+1 −11
Original line number Diff line number Diff line
@@ -2461,13 +2461,6 @@ unsigned int __read_mostly sched_enable_hmp = 0;
 */
unsigned int __read_mostly sysctl_sched_spill_nr_run = 10;

/*
 * Control whether or not individual CPU power consumption is used to
 * guide task placement.
 * This sysctl can be set to a default value using boot command line arguments.
 */
unsigned int __read_mostly sysctl_sched_enable_power_aware = 0;

/*
 * Place sync wakee tasks those have less than configured demand to the waker's
 * cluster.
@@ -2837,8 +2830,7 @@ unsigned int power_cost(int cpu, u64 demand)
	struct rq *rq = cpu_rq(cpu);
	unsigned int pc;

	if (!per_cpu_info || !per_cpu_info[cpu].ptable ||
	    !sysctl_sched_enable_power_aware)
	if (!per_cpu_info || !per_cpu_info[cpu].ptable)
		/* When power aware scheduling is not in use, or CPU
		 * power data is not available, just use the CPU
		 * capacity as a rough stand-in for real CPU power
@@ -4074,8 +4066,6 @@ unsigned int cpu_temp(int cpu)

#else	/* CONFIG_SCHED_HMP */

#define sysctl_sched_enable_power_aware 0

static inline int task_will_fit(struct task_struct *p, int cpu)
{
	return 1;
+9 −9
Original line number Diff line number Diff line
@@ -393,6 +393,15 @@ static struct ctl_table kern_table[] = {
		.mode           = 0644,
		.proc_handler   = sched_window_update_handler,
	},
	{
		.procname	= "sched_enable_power_aware",
		.data		= &sysctl_sched_enable_power_aware,
		.maxlen		= sizeof(unsigned int),
		.mode		= 0644,
		.proc_handler	= proc_dointvec_minmax,
		.extra1		= &zero,
		.extra2		= &one,
	},
#endif
#endif
	{
@@ -533,15 +542,6 @@ static struct ctl_table kern_table[] = {
		.mode		= 0644,
		.proc_handler	= sched_boost_handler,
	},
	{
		.procname	= "sched_enable_power_aware",
		.data		= &sysctl_sched_enable_power_aware,
		.maxlen		= sizeof(unsigned int),
		.mode		= 0644,
		.proc_handler	= proc_dointvec_minmax,
		.extra1		= &zero,
		.extra2		= &one,
	},
#endif	/* CONFIG_SCHED_HMP */
#ifdef CONFIG_SCHED_DEBUG
	{