sched: Disable LPM if CONSERVATIVE_BOOST is enabled

Disable LPM for hysteresis time if CONSERVATIVE_BOOST is enabled.

Change-Id: If88513b664c00ecb2cd48961b907bec719e822a9
Signed-off-by: Rishabh Bhatnagar <rishabhb@codeaurora.org>
This commit is contained in:
Rishabh Bhatnagar 2021-04-27 18:46:40 -07:00 committed by Rishabh Bhatnagar
parent ddb1c85d60
commit efabb036d0
2 changed files with 20 additions and 6 deletions

View File

@ -29,4 +29,13 @@ config SCHED_WALT_DEBUG
This module also used to crash the system to catch issues
in scenarios like RT throttling and sleeping while in atomic
context etc.
config SCHED_CONSERVATIVE_BOOST_LPM_BIAS
bool "Enable LPM bias if conservative boost is enabled"
default n
help
This feature will allow the scheduler to disable low power
modes on a cpu if conservative boost is active. The cpu
will not enter low power mode for a hysteresis time period,
which can be configured from userspace.
endmenu

View File

@ -147,6 +147,7 @@ static inline void update_busy_hyst_end_time(int cpu, bool dequeue,
u64 agg_hyst_time, total_util = 0;
bool util_load_trigger = false;
int i;
bool hyst_trigger, coloc_trigger;
if (!per_cpu(hyst_time, cpu) && !per_cpu(coloc_hyst_time, cpu) &&
!per_cpu(util_hyst_time, cpu))
@ -172,12 +173,16 @@ static inline void update_busy_hyst_end_time(int cpu, bool dequeue,
}
}
agg_hyst_time = max(max((nr_run_trigger || load_trigger) ?
per_cpu(hyst_time, cpu) : 0,
(nr_run_trigger || coloc_load_trigger) ?
per_cpu(coloc_hyst_time, cpu) : 0),
(util_load_trigger) ?
per_cpu(util_hyst_time, cpu) : 0);
coloc_trigger = nr_run_trigger || coloc_load_trigger;
#ifdef CONFIG_SCHED_CONSERVATIVE_BOOST_LPM_BIAS
hyst_trigger = nr_run_trigger || load_trigger || (sched_boost_type == CONSERVATIVE_BOOST);
#else
hyst_trigger = nr_run_trigger || load_trigger;
#endif
agg_hyst_time = max(max(hyst_trigger ? per_cpu(hyst_time, cpu) : 0,
coloc_trigger ? per_cpu(coloc_hyst_time, cpu) : 0),
util_load_trigger ? per_cpu(util_hyst_time, cpu) : 0);
if (agg_hyst_time) {
atomic64_set(&per_cpu(busy_hyst_end_time, cpu),