Loading include/linux/sched/sysctl.h +1 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,7 @@ extern unsigned int sysctl_sched_cpu_high_irqload; extern unsigned int sysctl_sched_boost; extern unsigned int sysctl_sched_group_upmigrate_pct; extern unsigned int sysctl_sched_group_downmigrate_pct; extern unsigned int sysctl_sched_conservative_pl; extern unsigned int sysctl_sched_many_wakeup_threshold; extern unsigned int sysctl_sched_walt_rotate_big_tasks; extern unsigned int sysctl_sched_min_task_util_for_boost; Loading kernel/sched/cpufreq_schedutil.c +15 −2 Original line number Diff line number Diff line Loading @@ -161,6 +161,15 @@ static inline bool use_pelt(void) #endif } static inline bool conservative_pl(void) { #ifdef CONFIG_SCHED_WALT return sysctl_sched_conservative_pl; #else return false; #endif } static unsigned long freq_to_util(struct sugov_policy *sg_policy, unsigned int freq) { Loading Loading @@ -379,6 +388,7 @@ static void sugov_walt_adjust(struct sugov_cpu *sg_cpu, unsigned long *util, unsigned long nl = sg_cpu->walt_load.nl; unsigned long cpu_util = sg_cpu->util; bool is_hiload; unsigned long pl = sg_cpu->walt_load.pl; if (unlikely(!sysctl_sched_use_walt_cpu_util)) return; Loading @@ -393,8 +403,11 @@ static void sugov_walt_adjust(struct sugov_cpu *sg_cpu, unsigned long *util, if (is_hiload && nl >= mult_frac(cpu_util, NL_RATIO, 100)) *util = *max; if (sg_policy->tunables->pl) *util = max(*util, sg_cpu->walt_load.pl); if (sg_policy->tunables->pl) { if (conservative_pl()) pl = mult_frac(pl, TARGET_LOAD, 100); *util = max(*util, pl); } } static void sugov_update_single(struct update_util_data *hook, u64 time, Loading kernel/sched/fair.c +10 −2 Original line number Diff line number Diff line Loading @@ -5848,7 +5848,7 @@ static unsigned long __cpu_norm_util(unsigned long util, unsigned long capacity) } static inline bool bias_to_waker_cpu(struct task_struct *p, int cpu, struct cpumask *rtg_target) bias_to_this_cpu(struct task_struct *p, int cpu, struct cpumask *rtg_target) { bool base_test = cpumask_test_cpu(cpu, &p->cpus_allowed) && cpu_active(cpu) && task_fits_max(p, cpu); Loading Loading @@ -7469,6 +7469,7 @@ enum fastpaths { NONE = 0, SYNC_WAKEUP, PREV_CPU_FASTPATH, MANY_WAKEUP, }; static inline int find_best_target(struct task_struct *p, int *backup_cpu, Loading Loading @@ -8181,12 +8182,19 @@ static int find_energy_efficient_cpu(struct sched_domain *sd, sync = 0; if (sysctl_sched_sync_hint_enable && sync && bias_to_waker_cpu(p, cpu, rtg_target)) { bias_to_this_cpu(p, cpu, rtg_target)) { target_cpu = cpu; fbt_env.fastpath = SYNC_WAKEUP; goto out; } if (is_many_wakeup(sibling_count_hint) && prev_cpu != cpu && bias_to_this_cpu(p, prev_cpu, rtg_target)) { target_cpu = prev_cpu; fbt_env.fastpath = MANY_WAKEUP; goto out; } /* prepopulate energy diff environment */ eenv = get_eenv(p, prev_cpu); if (eenv->max_cpu_count < 2) Loading kernel/sched/sched.h +0 −1 Original line number Diff line number Diff line Loading @@ -2123,7 +2123,6 @@ cpu_util_freq_walt(int cpu, struct sched_walt_cpu_load *walt_load) nl = div64_u64(nl * (100 + boost), walt_cpu_util_freq_divisor); pl = div64_u64(pl * (100 + boost), 100); walt_load->prev_window_util = util; walt_load->nl = nl; Loading kernel/sched/walt.c +1 −0 Original line number Diff line number Diff line Loading @@ -922,6 +922,7 @@ void set_window_start(struct rq *rq) unsigned int max_possible_efficiency = 1; unsigned int min_possible_efficiency = UINT_MAX; unsigned int sysctl_sched_conservative_pl; unsigned int sysctl_sched_many_wakeup_threshold = 1000; #define INC_STEP 8 Loading Loading
include/linux/sched/sysctl.h +1 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,7 @@ extern unsigned int sysctl_sched_cpu_high_irqload; extern unsigned int sysctl_sched_boost; extern unsigned int sysctl_sched_group_upmigrate_pct; extern unsigned int sysctl_sched_group_downmigrate_pct; extern unsigned int sysctl_sched_conservative_pl; extern unsigned int sysctl_sched_many_wakeup_threshold; extern unsigned int sysctl_sched_walt_rotate_big_tasks; extern unsigned int sysctl_sched_min_task_util_for_boost; Loading
kernel/sched/cpufreq_schedutil.c +15 −2 Original line number Diff line number Diff line Loading @@ -161,6 +161,15 @@ static inline bool use_pelt(void) #endif } static inline bool conservative_pl(void) { #ifdef CONFIG_SCHED_WALT return sysctl_sched_conservative_pl; #else return false; #endif } static unsigned long freq_to_util(struct sugov_policy *sg_policy, unsigned int freq) { Loading Loading @@ -379,6 +388,7 @@ static void sugov_walt_adjust(struct sugov_cpu *sg_cpu, unsigned long *util, unsigned long nl = sg_cpu->walt_load.nl; unsigned long cpu_util = sg_cpu->util; bool is_hiload; unsigned long pl = sg_cpu->walt_load.pl; if (unlikely(!sysctl_sched_use_walt_cpu_util)) return; Loading @@ -393,8 +403,11 @@ static void sugov_walt_adjust(struct sugov_cpu *sg_cpu, unsigned long *util, if (is_hiload && nl >= mult_frac(cpu_util, NL_RATIO, 100)) *util = *max; if (sg_policy->tunables->pl) *util = max(*util, sg_cpu->walt_load.pl); if (sg_policy->tunables->pl) { if (conservative_pl()) pl = mult_frac(pl, TARGET_LOAD, 100); *util = max(*util, pl); } } static void sugov_update_single(struct update_util_data *hook, u64 time, Loading
kernel/sched/fair.c +10 −2 Original line number Diff line number Diff line Loading @@ -5848,7 +5848,7 @@ static unsigned long __cpu_norm_util(unsigned long util, unsigned long capacity) } static inline bool bias_to_waker_cpu(struct task_struct *p, int cpu, struct cpumask *rtg_target) bias_to_this_cpu(struct task_struct *p, int cpu, struct cpumask *rtg_target) { bool base_test = cpumask_test_cpu(cpu, &p->cpus_allowed) && cpu_active(cpu) && task_fits_max(p, cpu); Loading Loading @@ -7469,6 +7469,7 @@ enum fastpaths { NONE = 0, SYNC_WAKEUP, PREV_CPU_FASTPATH, MANY_WAKEUP, }; static inline int find_best_target(struct task_struct *p, int *backup_cpu, Loading Loading @@ -8181,12 +8182,19 @@ static int find_energy_efficient_cpu(struct sched_domain *sd, sync = 0; if (sysctl_sched_sync_hint_enable && sync && bias_to_waker_cpu(p, cpu, rtg_target)) { bias_to_this_cpu(p, cpu, rtg_target)) { target_cpu = cpu; fbt_env.fastpath = SYNC_WAKEUP; goto out; } if (is_many_wakeup(sibling_count_hint) && prev_cpu != cpu && bias_to_this_cpu(p, prev_cpu, rtg_target)) { target_cpu = prev_cpu; fbt_env.fastpath = MANY_WAKEUP; goto out; } /* prepopulate energy diff environment */ eenv = get_eenv(p, prev_cpu); if (eenv->max_cpu_count < 2) Loading
kernel/sched/sched.h +0 −1 Original line number Diff line number Diff line Loading @@ -2123,7 +2123,6 @@ cpu_util_freq_walt(int cpu, struct sched_walt_cpu_load *walt_load) nl = div64_u64(nl * (100 + boost), walt_cpu_util_freq_divisor); pl = div64_u64(pl * (100 + boost), 100); walt_load->prev_window_util = util; walt_load->nl = nl; Loading
kernel/sched/walt.c +1 −0 Original line number Diff line number Diff line Loading @@ -922,6 +922,7 @@ void set_window_start(struct rq *rq) unsigned int max_possible_efficiency = 1; unsigned int min_possible_efficiency = UINT_MAX; unsigned int sysctl_sched_conservative_pl; unsigned int sysctl_sched_many_wakeup_threshold = 1000; #define INC_STEP 8 Loading