sched: eliminate sched_account_wait_time knob
Kill unused scheduler knob sched_account_wait_time. With this change scheduler always accounts task's wait time into demand. Change-Id: Ifa4bcb5685798f48fd020f3d0c9853220b3f5fdc Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
This commit is contained in:
parent
a2ac6d40d3
commit
5160d93b6d
5 changed files with 20 additions and 50 deletions
|
@ -1113,16 +1113,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_account_wait_time
|
||||
|
||||
Appears at: /proc/sys/kernel/sched_account_wait_time
|
||||
|
||||
Default value: 1
|
||||
|
||||
This controls whether a task's wait time is accounted as its demand for cpu
|
||||
and thus the values found in its sum, sum_history[] and demand attributes.
|
||||
|
||||
*** 7.12 sched_freq_account_wait_time
|
||||
*** 7.11 sched_freq_account_wait_time
|
||||
|
||||
Appears at: /proc/sys/kernel/sched_freq_account_wait_time
|
||||
|
||||
|
@ -1132,7 +1123,7 @@ This controls whether a task's wait time is accounted in its curr_window and
|
|||
prev_window attributes and thus in a cpu's curr_runnable_sum and
|
||||
prev_runnable_sum counters.
|
||||
|
||||
*** 7.13 sched_migration_fixup
|
||||
*** 7.12 sched_migration_fixup
|
||||
|
||||
Appears at: /proc/sys/kernel/sched_migration_fixup
|
||||
|
||||
|
@ -1141,7 +1132,7 @@ Default value: 1
|
|||
This controls whether a cpu's busy time counters are adjusted during task
|
||||
migration.
|
||||
|
||||
*** 7.14 sched_freq_inc_notify
|
||||
*** 7.13 sched_freq_inc_notify
|
||||
|
||||
Appears at: /proc/sys/kernel/sched_freq_inc_notify
|
||||
|
||||
|
@ -1153,7 +1144,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.15 sched_freq_dec_notify
|
||||
*** 7.14 sched_freq_dec_notify
|
||||
|
||||
Appears at: /proc/sys/kernel/sched_freq_dec_notify
|
||||
|
||||
|
@ -1166,7 +1157,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.16 sched_heavy_task
|
||||
** 7.15 sched_heavy_task
|
||||
|
||||
Appears at: /proc/sys/kernel/sched_heavy_task
|
||||
|
||||
|
@ -1178,7 +1169,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.17 sched_cpu_high_irqload
|
||||
*** 7.16 sched_cpu_high_irqload
|
||||
|
||||
Appears at: /proc/sys/kernel/sched_cpu_high_irqload
|
||||
|
||||
|
@ -1196,7 +1187,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.18 cpu.upmigrate_discourage
|
||||
** 7.17 cpu.upmigrate_discourage
|
||||
|
||||
Default value : 0
|
||||
|
||||
|
@ -1212,7 +1203,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.19 sched_static_cpu_pwr_cost
|
||||
*** 7.18 sched_static_cpu_pwr_cost
|
||||
|
||||
Default value: 0
|
||||
|
||||
|
@ -1227,7 +1218,7 @@ within a cluster and possibly have differing value between clusters as
|
|||
needed.
|
||||
|
||||
|
||||
*** 7.20 sched_static_cluster_pwr_cost
|
||||
*** 7.19 sched_static_cluster_pwr_cost
|
||||
|
||||
Default value: 0
|
||||
|
||||
|
@ -1238,7 +1229,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.23 sched_early_detection_duration
|
||||
*** 7.20 sched_early_detection_duration
|
||||
|
||||
Default value: 9500000
|
||||
|
||||
|
@ -1249,7 +1240,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.24 sched_restrict_cluster_spill
|
||||
*** 7.21 sched_restrict_cluster_spill
|
||||
|
||||
Default value: 0
|
||||
|
||||
|
@ -1268,7 +1259,7 @@ CPU across all clusters. When this tunable is enabled, the RT tasks are
|
|||
restricted to the lowest possible power cluster.
|
||||
|
||||
|
||||
*** 7.25 sched_downmigrate
|
||||
*** 7.22 sched_downmigrate
|
||||
|
||||
Appears at: /proc/sys/kernel/sched_downmigrate
|
||||
|
||||
|
@ -1281,7 +1272,7 @@ its demand *in reference to the power-efficient cpu* drops less than 60%
|
|||
(sched_downmigrate).
|
||||
|
||||
|
||||
*** 7.26 sched_small_wakee_task_load
|
||||
*** 7.23 sched_small_wakee_task_load
|
||||
|
||||
Appears at: /proc/sys/kernel/sched_small_wakee_task_load
|
||||
|
||||
|
@ -1293,7 +1284,7 @@ categorized as small wakee tasks. Scheduler places small wakee tasks on the
|
|||
waker's cluster.
|
||||
|
||||
|
||||
*** 7.26 sched_big_waker_task_load
|
||||
*** 7.24 sched_big_waker_task_load
|
||||
|
||||
Appears at: /proc/sys/kernel/sched_big_waker_task_load
|
||||
|
||||
|
@ -1450,10 +1441,9 @@ cpus are being reset. Changes to below attributes result in such a reset:
|
|||
|
||||
* sched_ravg_window (See Sec 2)
|
||||
* sched_window_stats_policy (See Sec 2.4)
|
||||
* sched_account_wait_time (See Sec 7.15)
|
||||
* sched_ravg_hist_size (See Sec 7.11)
|
||||
* sched_migration_fixup (See Sec 7.17)
|
||||
* sched_freq_account_wait_time (See Sec 7.16)
|
||||
* sched_migration_fixup (See Sec 7.12)
|
||||
* sched_freq_account_wait_time (See Sec 7.11)
|
||||
|
||||
<task>-0 [004] d.h4 12700.711489: sched_reset_all_windows_stats: time_taken 1123 window_start 0 window_size 0 reason POLICY_CHANGE old_val 0 new_val 1
|
||||
|
||||
|
|
|
@ -42,7 +42,6 @@ extern unsigned int sysctl_sched_child_runs_first;
|
|||
extern unsigned int sysctl_sched_wake_to_idle;
|
||||
extern unsigned int sysctl_sched_wakeup_load_threshold;
|
||||
extern unsigned int sysctl_sched_window_stats_policy;
|
||||
extern unsigned int sysctl_sched_account_wait_time;
|
||||
extern unsigned int sysctl_sched_ravg_hist_size;
|
||||
extern unsigned int sysctl_sched_cpu_high_irqload;
|
||||
extern unsigned int sysctl_sched_freq_account_wait_time;
|
||||
|
|
|
@ -1763,7 +1763,7 @@ struct cpu_cycle {
|
|||
#if defined(CONFIG_SCHED_HMP)
|
||||
|
||||
/*
|
||||
* sched_window_stats_policy, sched_account_wait_time, sched_ravg_hist_size,
|
||||
* sched_window_stats_policy, sched_ravg_hist_size,
|
||||
* sched_migration_fixup, sched_freq_account_wait_time have a 'sysctl' copy
|
||||
* associated with them. This is required for atomic update of those variables
|
||||
* when being modifed via sysctl interface.
|
||||
|
@ -1786,8 +1786,7 @@ static __read_mostly unsigned int sched_window_stats_policy =
|
|||
__read_mostly unsigned int sysctl_sched_window_stats_policy =
|
||||
WINDOW_STATS_MAX_RECENT_AVG;
|
||||
|
||||
static __read_mostly unsigned int sched_account_wait_time = 1;
|
||||
__read_mostly unsigned int sysctl_sched_account_wait_time = 1;
|
||||
#define SCHED_ACCOUNT_WAIT_TIME 1
|
||||
|
||||
__read_mostly unsigned int sysctl_sched_cpu_high_irqload = (10 * NSEC_PER_MSEC);
|
||||
|
||||
|
@ -2794,7 +2793,7 @@ static int account_busy_for_task_demand(struct task_struct *p, int event)
|
|||
* time. Likewise, if wait time is not treated as busy time, then
|
||||
* when a task begins to run or is migrated, it is not running and
|
||||
* is completing a segment of non-busy time. */
|
||||
if (event == TASK_WAKE || (!sched_account_wait_time &&
|
||||
if (event == TASK_WAKE || (!SCHED_ACCOUNT_WAIT_TIME &&
|
||||
(event == PICK_NEXT_TASK || event == TASK_MIGRATE)))
|
||||
return 0;
|
||||
|
||||
|
@ -3185,7 +3184,6 @@ static void enable_window_stats(void)
|
|||
enum reset_reason_code {
|
||||
WINDOW_CHANGE,
|
||||
POLICY_CHANGE,
|
||||
ACCOUNT_WAIT_TIME_CHANGE,
|
||||
HIST_SIZE_CHANGE,
|
||||
MIGRATION_FIXUP_CHANGE,
|
||||
FREQ_ACCOUNT_WAIT_TIME_CHANGE,
|
||||
|
@ -3195,7 +3193,6 @@ enum reset_reason_code {
|
|||
const char *sched_window_reset_reasons[] = {
|
||||
"WINDOW_CHANGE",
|
||||
"POLICY_CHANGE",
|
||||
"ACCOUNT_WAIT_TIME_CHANGE",
|
||||
"HIST_SIZE_CHANGE",
|
||||
"MIGRATION_FIXUP_CHANGE",
|
||||
"FREQ_ACCOUNT_WAIT_TIME_CHANGE"};
|
||||
|
@ -3260,11 +3257,6 @@ void reset_all_window_stats(u64 window_start, unsigned int window_size)
|
|||
old = sched_window_stats_policy;
|
||||
new = sysctl_sched_window_stats_policy;
|
||||
sched_window_stats_policy = sysctl_sched_window_stats_policy;
|
||||
} else if (sched_account_wait_time != sysctl_sched_account_wait_time) {
|
||||
reason = ACCOUNT_WAIT_TIME_CHANGE;
|
||||
old = sched_account_wait_time;
|
||||
new = sysctl_sched_account_wait_time;
|
||||
sched_account_wait_time = sysctl_sched_account_wait_time;
|
||||
} else if (sched_ravg_hist_size != sysctl_sched_ravg_hist_size) {
|
||||
reason = HIST_SIZE_CHANGE;
|
||||
old = sched_ravg_hist_size;
|
||||
|
|
|
@ -4080,16 +4080,12 @@ static inline int invalid_value(unsigned int *data)
|
|||
if (data == &sysctl_sched_window_stats_policy)
|
||||
return val >= WINDOW_STATS_INVALID_POLICY;
|
||||
|
||||
if (data == &sysctl_sched_account_wait_time)
|
||||
return !(val == 0 || val == 1);
|
||||
|
||||
return invalid_value_freq_input(data);
|
||||
}
|
||||
|
||||
/*
|
||||
* Handle "atomic" update of sysctl_sched_window_stats_policy,
|
||||
* sysctl_sched_ravg_hist_size, sysctl_sched_account_wait_time and
|
||||
* sched_freq_legacy_mode variables.
|
||||
* sysctl_sched_ravg_hist_size and sched_freq_legacy_mode variables.
|
||||
*/
|
||||
int sched_window_update_handler(struct ctl_table *table, int write,
|
||||
void __user *buffer, size_t *lenp,
|
||||
|
|
|
@ -339,13 +339,6 @@ static struct ctl_table kern_table[] = {
|
|||
},
|
||||
#endif
|
||||
#ifdef CONFIG_SCHED_HMP
|
||||
{
|
||||
.procname = "sched_account_wait_time",
|
||||
.data = &sysctl_sched_account_wait_time,
|
||||
.maxlen = sizeof(unsigned int),
|
||||
.mode = 0644,
|
||||
.proc_handler = sched_window_update_handler,
|
||||
},
|
||||
{
|
||||
.procname = "sched_cpu_high_irqload",
|
||||
.data = &sysctl_sched_cpu_high_irqload,
|
||||
|
|
Loading…
Add table
Reference in a new issue