Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

cpufreq: governor: Always schedule work on the CPU running update

Modify dbs_irq_work() to always schedule the process-context work
on the current CPU which also ran the dbs_update_util_handler()
that the irq_work being handled came from.

This causes the entire frequency update handling (involving the
"ondemand" or "conservative" governors) to be carried out by the
CPU whose frequency is to be updated and reduces the overall amount
of inter-CPU noise related to cpufreq.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

+1 -1
+1 -1
drivers/cpufreq/cpufreq_governor.c
··· 329 329 struct policy_dbs_info *policy_dbs; 330 330 331 331 policy_dbs = container_of(irq_work, struct policy_dbs_info, irq_work); 332 - schedule_work(&policy_dbs->work); 332 + schedule_work_on(smp_processor_id(), &policy_dbs->work); 333 333 } 334 334 335 335 static void dbs_update_util_handler(struct update_util_data *data, u64 time,