From 4a531492c97a3874c9a46df850f93045c16a8b91 Mon Sep 17 00:00:00 2001 From: Shaleen Agrawal Date: Mon, 6 Dec 2021 16:36:44 -0800 Subject: [PATCH] sched/walt: Increase the number of history samples The number history samples should be raised to a higher value so that an active history of 100ms is considered in accounting task demand. Raise the history size from 5 to 8 given the default windows size is 8ms. This will capture 64ms of history for 8ms windows, and 128ms of history for 16ms windows, granting a compromise to prevent further code bloat. Change-Id: I63ad5b2a20c9a32d3a65448a78d6aec98afe6ad5 Signed-off-by: Shaleen Agrawal --- include/linux/sched/walt.h | 2 +- kernel/sched/walt/walt.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/sched/walt.h b/include/linux/sched/walt.h index c03a3f30caa4..e7813c280140 100644 --- a/include/linux/sched/walt.h +++ b/include/linux/sched/walt.h @@ -31,7 +31,7 @@ enum task_boost_type { }; #define WALT_NR_CPUS 8 -#define RAVG_HIST_SIZE_MAX 5 +#define RAVG_HIST_SIZE_MAX 8 #define NUM_BUSY_BUCKETS 10 struct walt_related_thread_group { diff --git a/kernel/sched/walt/walt.c b/kernel/sched/walt/walt.c index 8c0b909da209..2b904b127ce0 100644 --- a/kernel/sched/walt/walt.c +++ b/kernel/sched/walt/walt.c @@ -154,7 +154,7 @@ static inline void release_rq_locks_irqrestore(const cpumask_t *cpus, static unsigned int walt_cpu_high_irqload; -static __read_mostly unsigned int sched_ravg_hist_size = 5; +static __read_mostly unsigned int sched_ravg_hist_size = RAVG_HIST_SIZE_MAX; static __read_mostly unsigned int sched_io_is_busy = 1;