Skip to content

Commit a252c25

Browse files
committed
Merge branches 'pm-cpufreq-sched' and 'intel_pstate'
* pm-cpufreq-sched: cpufreq: schedutil: Fix sugov_start() versus sugov_update_shared() race * intel_pstate: cpufreq: intel_pstate: Fix ratio setting for min_perf_pct
3 parents ec4b8dd + ab2f7cf + d4436c0 commit a252c25

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

drivers/cpufreq/intel_pstate.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,7 @@ static int min_perf_pct_min(void)
572572
int turbo_pstate = cpu->pstate.turbo_pstate;
573573

574574
return turbo_pstate ?
575-
DIV_ROUND_UP(cpu->pstate.min_pstate * 100, turbo_pstate) : 0;
575+
(cpu->pstate.min_pstate * 100 / turbo_pstate) : 0;
576576
}
577577

578578
static s16 intel_pstate_get_epb(struct cpudata *cpu_data)

kernel/sched/cpufreq_schedutil.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -610,6 +610,11 @@ static int sugov_start(struct cpufreq_policy *policy)
610610
sg_cpu->sg_policy = sg_policy;
611611
sg_cpu->flags = SCHED_CPUFREQ_RT;
612612
sg_cpu->iowait_boost_max = policy->cpuinfo.max_freq;
613+
}
614+
615+
for_each_cpu(cpu, policy->cpus) {
616+
struct sugov_cpu *sg_cpu = &per_cpu(sugov_cpu, cpu);
617+
613618
cpufreq_add_update_util_hook(cpu, &sg_cpu->update_util,
614619
policy_is_shared(policy) ?
615620
sugov_update_shared :

0 commit comments

Comments
 (0)