x86/cpu: Avoid cpuinfo-induced IPIing of idle CPUs
authorPaul E. McKenney <paulmck@kernel.org>
Thu, 3 Sep 2020 22:23:29 +0000 (15:23 -0700)
committerPaul E. McKenney <paulmck@kernel.org>
Sat, 7 Nov 2020 00:59:11 +0000 (16:59 -0800)
commit3fcd6a230fa7d03bffcb831a81b40435c146c12b
treebc576b40954c9deb95bf32151cb4535fe889297f
parentf4deaf90212c18d4b6d0687f0cba4c22d90b3391
x86/cpu: Avoid cpuinfo-induced IPIing of idle CPUs

Currently, accessing /proc/cpuinfo sends IPIs to idle CPUs in order to
learn their clock frequency.  Which is a bit strange, given that waking
them from idle likely significantly changes their clock frequency.
This commit therefore avoids sending /proc/cpuinfo-induced IPIs to
idle CPUs.

[ paulmck: Also check for idle in arch_freq_prepare_all(). ]
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: <x86@kernel.org>
arch/x86/kernel/cpu/aperfmperf.c
include/linux/rcutiny.h
include/linux/rcutree.h
kernel/rcu/tree.c