Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d368c6fa authored by Joonwoo Park's avatar Joonwoo Park Committed by Suren Baghdasaryan
Browse files

sched: walt: fix window misalignment when HZ=300



Due to rounding error hrtimer tick interval becomes 3333333 ns 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: default avatarJoel Fernandes <joelaf@google.com>
Signed-off-by: default avatarJoonwoo Park <joonwoop@codeaurora.org>
parent 97841e57
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -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