summaryrefslogtreecommitdiff
path: root/kernel/sched/sched.h
diff options
context:
space:
mode:
authorVikram Mulukutla <markivx@codeaurora.org>2017-08-10 17:26:20 -0700
committerJoel Fernandes <joelaf@google.com>2017-10-27 11:58:48 -0700
commite79f447a9762f68d6ecf8371bcf3e970bceb662a (patch)
tree24bf123315e9152f2bea602138d913d98d8b08a5 /kernel/sched/sched.h
parent38ddcff85af052ad99e4f3f0b6e9659b0ca10dcf (diff)
sched: walt: Correct WALT window size initialization
It is preferable that WALT window rollover occurs just before a tick, since the tick is an opportune moment to record a complete window's statistics, as well as report those stats to the cpu frequency governor. When CONFIG_HZ results in a TICK_NSEC that isn't a integral number, this requirement may be violated. Account for this by reducing the WALT window size to the nearest multiple of TICK_NSEC. Commit d368c6faa19b ("sched: walt: fix window misalignment when HZ=300") attempted to do this but WALT isn't using MIN_SCHED_RAVG_WINDOW as the window size and the patch was doing nothing. Also, change the type of 'walt_disabled' to bool and warn if an invalid window size causes WALT to be disabled. Change-Id: Ie3dcfc21a3df4408254ca1165a355bbe391ed5c7 Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
Diffstat (limited to 'kernel/sched/sched.h')
-rw-r--r--kernel/sched/sched.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index a2d5de8415e1..dd86072eaf4e 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -1560,7 +1560,7 @@ static inline unsigned long capacity_orig_of(int cpu)
extern unsigned int sysctl_sched_use_walt_cpu_util;
extern unsigned int walt_ravg_window;
-extern unsigned int walt_disabled;
+extern bool walt_disabled;
/*
* cpu_util returns the amount of capacity of a CPU that is used by CFS