diff options
| author | Linux Build Service Account <lnxbuild@localhost> | 2017-02-07 02:08:10 -0800 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-02-07 02:08:10 -0800 |
| commit | a2c6971ce7c61d5779373fc7a8fb4e5ffa3b9ba1 (patch) | |
| tree | 3e663ac18a88598b4037938280e4dffc1a21d9cf /kernel | |
| parent | 15d2d5b37fe005c89308dbb42059e9dd59cd3694 (diff) | |
| parent | 00861ed665330b2749a7fc6439cc559fe685c0bf (diff) | |
Merge "sysctl: define upper limit for sched_freq_reporting_policy"
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/sched/hmp.c | 2 | ||||
| -rw-r--r-- | kernel/sched/sched.h | 4 | ||||
| -rw-r--r-- | kernel/sysctl.c | 5 |
3 files changed, 5 insertions, 6 deletions
diff --git a/kernel/sched/hmp.c b/kernel/sched/hmp.c index 1c0defb34ae1..036e3b50cc4f 100644 --- a/kernel/sched/hmp.c +++ b/kernel/sched/hmp.c @@ -3108,7 +3108,7 @@ static inline u64 freq_policy_load(struct rq *rq, u64 load) case FREQ_REPORT_CPU_LOAD: break; default: - WARN_ON_ONCE(1); + break; } return load; diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index a91f4cc1d8d3..360e298398fb 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -1071,10 +1071,6 @@ enum sched_boost_policy { #define WINDOW_STATS_AVG 3 #define WINDOW_STATS_INVALID_POLICY 4 -#define FREQ_REPORT_MAX_CPU_LOAD_TOP_TASK 0 -#define FREQ_REPORT_CPU_LOAD 1 -#define FREQ_REPORT_TOP_TASK 2 - #define SCHED_UPMIGRATE_MIN_NICE 15 #define EXITING_TASK_MARKER 0xdeaddead diff --git a/kernel/sysctl.c b/kernel/sysctl.c index a2a87c3ad44e..7112dc54d88e 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -133,6 +133,7 @@ static int ten_thousand = 10000; #endif #ifdef CONFIG_SCHED_HMP static int one_thousand = 1000; +static int max_freq_reporting_policy = FREQ_REPORT_INVALID_POLICY - 1; #endif /* this is needed for the proc_doulongvec_minmax of vm_dirty_bytes */ @@ -297,6 +298,7 @@ static struct ctl_table kern_table[] = { .mode = 0644, .proc_handler = proc_dointvec_minmax, .extra1 = &zero, + .extra2 = &max_freq_reporting_policy, }, { .procname = "sched_freq_inc_notify", @@ -591,7 +593,8 @@ static struct ctl_table kern_table[] = { .data = &sysctl_sched_time_avg, .maxlen = sizeof(unsigned int), .mode = 0644, - .proc_handler = proc_dointvec, + .proc_handler = proc_dointvec_minmax, + .extra1 = &one, }, { .procname = "sched_shares_window_ns", |
