Selaa lähdekoodia

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
Rafael J. Wysocki 8 vuotta sitten
vanhempi
commit
a252c258dd
2 muutettua tiedostoa jossa 6 lisäystä ja 1 poistoa
  1. 1 1
      drivers/cpufreq/intel_pstate.c
  2. 5 0
      kernel/sched/cpufreq_schedutil.c

+ 1 - 1
drivers/cpufreq/intel_pstate.c

@@ -572,7 +572,7 @@ static int min_perf_pct_min(void)
 	int turbo_pstate = cpu->pstate.turbo_pstate;
 
 	return turbo_pstate ?
-		DIV_ROUND_UP(cpu->pstate.min_pstate * 100, turbo_pstate) : 0;
+		(cpu->pstate.min_pstate * 100 / turbo_pstate) : 0;
 }
 
 static s16 intel_pstate_get_epb(struct cpudata *cpu_data)

+ 5 - 0
kernel/sched/cpufreq_schedutil.c

@@ -610,6 +610,11 @@ static int sugov_start(struct cpufreq_policy *policy)
 		sg_cpu->sg_policy = sg_policy;
 		sg_cpu->flags = SCHED_CPUFREQ_RT;
 		sg_cpu->iowait_boost_max = policy->cpuinfo.max_freq;
+	}
+
+	for_each_cpu(cpu, policy->cpus) {
+		struct sugov_cpu *sg_cpu = &per_cpu(sugov_cpu, cpu);
+
 		cpufreq_add_update_util_hook(cpu, &sg_cpu->update_util,
 					     policy_is_shared(policy) ?
 							sugov_update_shared :