From 462213d1ac46410c42a48054bd2a149dd48109a3 Mon Sep 17 00:00:00 2001 From: Joonwoo Park Date: Wed, 25 May 2016 11:27:35 -0700 Subject: sched: eliminate sched_freq_account_wait_time knob Kill unused scheduler knob sched_freq_account_wait_time. Change-Id: Ib74123ebd69dfa3f86cf7335099f50c12a6e93c3 Signed-off-by: Joonwoo Park --- kernel/sched/core.c | 23 +++++++---------------- kernel/sched/fair.c | 3 --- kernel/sysctl.c | 7 ------- 3 files changed, 7 insertions(+), 26 deletions(-) (limited to 'kernel') diff --git a/kernel/sched/core.c b/kernel/sched/core.c index e2235e4e7158..f7207b3fb590 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -1764,7 +1764,7 @@ struct cpu_cycle { /* * sched_window_stats_policy, sched_ravg_hist_size, - * sched_migration_fixup, sched_freq_account_wait_time have a 'sysctl' copy + * sched_migration_fixup have a 'sysctl' copy * associated with them. This is required for atomic update of those variables * when being modifed via sysctl interface. * @@ -1799,8 +1799,7 @@ __read_mostly unsigned int sysctl_sched_new_task_windows = 5; static __read_mostly unsigned int sched_migration_fixup = 1; __read_mostly unsigned int sysctl_sched_migration_fixup = 1; -static __read_mostly unsigned int sched_freq_account_wait_time; -__read_mostly unsigned int sysctl_sched_freq_account_wait_time; +#define SCHED_FREQ_ACCOUNT_WAIT_TIME 0 /* * For increase, send notification if @@ -2166,11 +2165,11 @@ static int account_busy_for_cpu_time(struct rq *rq, struct task_struct *p, if (rq->curr == p) return 1; - return p->on_rq ? sched_freq_account_wait_time : 0; + return p->on_rq ? SCHED_FREQ_ACCOUNT_WAIT_TIME : 0; } /* TASK_MIGRATE, PICK_NEXT_TASK left */ - return sched_freq_account_wait_time; + return SCHED_FREQ_ACCOUNT_WAIT_TIME; } static inline int @@ -2391,7 +2390,7 @@ void update_task_pred_demand(struct rq *rq, struct task_struct *p, int event) return; if (event != PUT_PREV_TASK && event != TASK_UPDATE && - (!sched_freq_account_wait_time || + (!SCHED_FREQ_ACCOUNT_WAIT_TIME || (event != TASK_MIGRATE && event != PICK_NEXT_TASK))) return; @@ -2401,7 +2400,7 @@ void update_task_pred_demand(struct rq *rq, struct task_struct *p, int event) * related groups */ if (event == TASK_UPDATE) { - if (!p->on_rq && !sched_freq_account_wait_time) + if (!p->on_rq && !SCHED_FREQ_ACCOUNT_WAIT_TIME) return; } @@ -3186,7 +3185,6 @@ enum reset_reason_code { POLICY_CHANGE, HIST_SIZE_CHANGE, MIGRATION_FIXUP_CHANGE, - FREQ_ACCOUNT_WAIT_TIME_CHANGE, FREQ_AGGREGATE_CHANGE, }; @@ -3195,7 +3193,7 @@ const char *sched_window_reset_reasons[] = { "POLICY_CHANGE", "HIST_SIZE_CHANGE", "MIGRATION_FIXUP_CHANGE", - "FREQ_ACCOUNT_WAIT_TIME_CHANGE"}; +}; /* Called with IRQs enabled */ void reset_all_window_stats(u64 window_start, unsigned int window_size) @@ -3269,13 +3267,6 @@ void reset_all_window_stats(u64 window_start, unsigned int window_size) old = sched_migration_fixup; new = sysctl_sched_migration_fixup; sched_migration_fixup = sysctl_sched_migration_fixup; - } else if (sched_freq_account_wait_time != - sysctl_sched_freq_account_wait_time) { - reason = FREQ_ACCOUNT_WAIT_TIME_CHANGE; - old = sched_freq_account_wait_time; - new = sysctl_sched_freq_account_wait_time; - sched_freq_account_wait_time = - sysctl_sched_freq_account_wait_time; } else if (sched_freq_aggregate != sysctl_sched_freq_aggregate) { reason = FREQ_AGGREGATE_CHANGE; diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 6a915f49eb2f..43fd05817375 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -4055,9 +4055,6 @@ static inline int invalid_value_freq_input(unsigned int *data) if (data == &sysctl_sched_migration_fixup) return !(*data == 0 || *data == 1); - if (data == &sysctl_sched_freq_account_wait_time) - return !(*data == 0 || *data == 1); - if (data == &sysctl_sched_freq_aggregate) return !(*data == 0 || *data == 1); diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 13bcfe33ffc3..ccc6f20f11d3 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -323,13 +323,6 @@ static struct ctl_table kern_table[] = { .mode = 0644, .proc_handler = sched_window_update_handler, }, - { - .procname = "sched_freq_account_wait_time", - .data = &sysctl_sched_freq_account_wait_time, - .maxlen = sizeof(unsigned int), - .mode = 0644, - .proc_handler = sched_window_update_handler, - }, { .procname = "sched_heavy_task", .data = &sysctl_sched_heavy_task_pct, -- cgit v1.2.3