Skip to content

Commit e2cabe4

Browse files
vireshkrafaeljw
authored andcommitted
cpufreq: schedutil: Don't restrict kthread to related_cpus unnecessarily
Utilization update callbacks are now processed remotely, even on the CPUs that don't share cpufreq policy with the target CPU (if dvfs_possible_from_any_cpu flag is set). But in non-fast switch paths, the frequency is changed only from one of policy->related_cpus. This happens because the kthread which does the actual update is bound to a subset of CPUs (i.e. related_cpus). Allow frequency to be remotely updated as well (i.e. call __cpufreq_driver_target()) if dvfs_possible_from_any_cpu flag is set. Reported-by: Pavan Kondeti <[email protected]> Signed-off-by: Viresh Kumar <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 209887e commit e2cabe4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

kernel/sched/cpufreq_schedutil.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,11 @@ static int sugov_kthread_create(struct sugov_policy *sg_policy)
487487
}
488488

489489
sg_policy->thread = thread;
490-
kthread_bind_mask(thread, policy->related_cpus);
490+
491+
/* Kthread is bound to all CPUs by default */
492+
if (!policy->dvfs_possible_from_any_cpu)
493+
kthread_bind_mask(thread, policy->related_cpus);
494+
491495
init_irq_work(&sg_policy->irq_work, sugov_irq_work);
492496
mutex_init(&sg_policy->work_lock);
493497

0 commit comments

Comments
 (0)