Loading kernel/sched/cpufreq_schedutil.c +11 −1 Original line number Diff line number Diff line Loading @@ -16,7 +16,7 @@ #include <uapi/linux/sched/types.h> #include <linux/slab.h> #include <trace/events/power.h> #include <linux/sched/sysctl.h> #include "sched.h" #define SUGOV_KTHREAD_PRIORITY 50 Loading Loading @@ -147,6 +147,10 @@ static void sugov_track_cycles(struct sugov_policy *sg_policy, u64 upto) { u64 delta_ns, cycles; if (unlikely(!sysctl_sched_use_walt_cpu_util)) return; /* Track cycles in current window */ delta_ns = upto - sg_policy->last_cyc_update_time; cycles = (prev_freq * delta_ns) / (NSEC_PER_SEC / KHZ); Loading @@ -160,6 +164,9 @@ static void sugov_calc_avg_cap(struct sugov_policy *sg_policy, u64 curr_ws, u64 last_ws = sg_policy->last_ws; unsigned int avg_freq; if (unlikely(!sysctl_sched_use_walt_cpu_util)) return; WARN_ON(curr_ws < last_ws); if (curr_ws <= last_ws) return; Loading Loading @@ -339,6 +346,9 @@ static void sugov_walt_adjust(struct sugov_cpu *sg_cpu, unsigned long *util, unsigned long cpu_util = sg_cpu->util; bool is_hiload; if (unlikely(!sysctl_sched_use_walt_cpu_util)) return; is_hiload = (cpu_util >= mult_frac(sg_policy->avg_cap, sg_policy->tunables->hispeed_load, 100)); Loading Loading
kernel/sched/cpufreq_schedutil.c +11 −1 Original line number Diff line number Diff line Loading @@ -16,7 +16,7 @@ #include <uapi/linux/sched/types.h> #include <linux/slab.h> #include <trace/events/power.h> #include <linux/sched/sysctl.h> #include "sched.h" #define SUGOV_KTHREAD_PRIORITY 50 Loading Loading @@ -147,6 +147,10 @@ static void sugov_track_cycles(struct sugov_policy *sg_policy, u64 upto) { u64 delta_ns, cycles; if (unlikely(!sysctl_sched_use_walt_cpu_util)) return; /* Track cycles in current window */ delta_ns = upto - sg_policy->last_cyc_update_time; cycles = (prev_freq * delta_ns) / (NSEC_PER_SEC / KHZ); Loading @@ -160,6 +164,9 @@ static void sugov_calc_avg_cap(struct sugov_policy *sg_policy, u64 curr_ws, u64 last_ws = sg_policy->last_ws; unsigned int avg_freq; if (unlikely(!sysctl_sched_use_walt_cpu_util)) return; WARN_ON(curr_ws < last_ws); if (curr_ws <= last_ws) return; Loading Loading @@ -339,6 +346,9 @@ static void sugov_walt_adjust(struct sugov_cpu *sg_cpu, unsigned long *util, unsigned long cpu_util = sg_cpu->util; bool is_hiload; if (unlikely(!sysctl_sched_use_walt_cpu_util)) return; is_hiload = (cpu_util >= mult_frac(sg_policy->avg_cap, sg_policy->tunables->hispeed_load, 100)); Loading