mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-25 03:50:24 +09:00
sched: walt: fix window misalignment when HZ=300
Due to rounding error hrtimer tick interval becomes3333333ns when HZ=300. Consequently the tick time stamp nearest to the WALT's default window size 20ms will be also 19999998 (3333333* 6). Change-Id: I08f9bd2dbecccbb683e4490d06d8b0da703d3ab2 Suggested-by: Joel Fernandes <joelaf@google.com> Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
This commit is contained in:
committed by
Suren Baghdasaryan
parent
97841e574a
commit
d368c6faa1
@@ -72,7 +72,15 @@ static cpumask_t mpc_mask = CPU_MASK_ALL;
|
||||
__read_mostly unsigned int walt_ravg_window = 20000000;
|
||||
|
||||
/* Min window size (in ns) = 10ms */
|
||||
#ifdef CONFIG_HZ_300
|
||||
/*
|
||||
* Tick interval becomes to 3333333 due to
|
||||
* rounding error when HZ=300.
|
||||
*/
|
||||
#define MIN_SCHED_RAVG_WINDOW (3333333 * 6)
|
||||
#else
|
||||
#define MIN_SCHED_RAVG_WINDOW 10000000
|
||||
#endif
|
||||
|
||||
/* Max window size (in ns) = 1s */
|
||||
#define MAX_SCHED_RAVG_WINDOW 1000000000
|
||||
|
||||
Reference in New Issue
Block a user