diff --git a/include/linux/sched/sysctl.h b/include/linux/sched/sysctl.h index 71615c95127c..fb4aba23f182 100755 --- a/include/linux/sched/sysctl.h +++ b/include/linux/sched/sysctl.h @@ -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; diff --git a/kernel/sched/boost.c b/kernel/sched/boost.c index 9c8aced98dba..b5c688ae9297 100755 --- a/kernel/sched/boost.c +++ b/kernel/sched/boost.c @@ -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) { diff --git a/kernel/sched/sched_avg.c b/kernel/sched/sched_avg.c index 42b047330c1a..c24b5643fafa 100755 --- a/kernel/sched/sched_avg.c +++ b/kernel/sched/sched_avg.c @@ -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; diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 3bd69c5423d8..430899aa15bc 100755 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -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,