sched: guard sched_boost behind the proper guards

fourteen
Ruchit 10 months ago committed by Jenna
parent 189885b1e5
commit a18751fb9a
  1. 2
      include/linux/sched/sysctl.h
  2. 4
      kernel/sched/boost.c
  3. 2
      kernel/sched/sched_avg.c
  4. 2
      kernel/sysctl.c

@ -37,7 +37,9 @@ extern unsigned int sysctl_sched_use_walt_cpu_util;
extern unsigned int sysctl_sched_use_walt_task_util;
extern unsigned int sysctl_sched_walt_init_task_load_pct;
extern unsigned int sysctl_sched_cpu_high_irqload;
#ifdef CONFIG_SCHED_SEC_TASK_BOOST
extern unsigned int sysctl_sched_boost;
#endif
extern unsigned int sysctl_sched_group_upmigrate_pct;
extern unsigned int sysctl_sched_group_downmigrate_pct;
extern unsigned int sysctl_sched_conservative_pl;

@ -23,7 +23,9 @@
* boost is responsible for disabling it as well.
*/
#ifdef CONFIG_SCHED_SEC_TASK_BOOST
unsigned int sysctl_sched_boost; /* To/from userspace */
#endif
unsigned int sched_boost_type; /* currently activated sched boost */
enum sched_boost_policy boost_policy;
@ -212,6 +214,7 @@ static void sched_boost_disable_all(void)
}
}
#ifdef CONFIG_SCHED_SEC_TASK_BOOST
static void _sched_set_boost(int type)
{
if (type == 0)
@ -233,6 +236,7 @@ static void _sched_set_boost(int type)
set_boost_policy(sysctl_sched_boost);
trace_sched_set_boost(sysctl_sched_boost);
}
#endif
void sched_boost_parse_dt(void)
{

@ -110,8 +110,10 @@ static inline void update_last_busy_time(int cpu, bool dequeue,
bool nr_run_trigger = false, load_trigger = false;
bool is_sched_boost = false;
#ifdef CONFIG_SCHED_SEC_TASK_BOOST
if (sysctl_sched_boost > 0)
is_sched_boost = true;
#endif
if (!hmp_capable() || is_min_capacity_cpu(cpu))
return;

@ -389,6 +389,7 @@ static struct ctl_table kern_table[] = {
.extra1 = &zero,
.extra2 = &sysctl_sched_group_upmigrate_pct,
},
#ifdef CONFIG_SCHED_SEC_TASK_BOOST
{
.procname = "sched_boost",
.data = &sysctl_sched_boost,
@ -398,6 +399,7 @@ static struct ctl_table kern_table[] = {
.extra1 = &neg_three,
.extra2 = &three,
},
#endif
{
.procname = "sched_conservative_pl",
.data = &sysctl_sched_conservative_pl,

Loading…
Cancel
Save