summaryrefslogtreecommitdiffstats
path: root/arch/x86/lib/msr-smp.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2018-03-23 14:58:18 -0700
committerThomas Gleixner <tglx@linutronix.de>2018-03-27 12:01:48 +0200
commit67bbd7a8d6bcdc44cc27105ae8c374e9176ceaf1 (patch)
treeaa876adde482382ffae7c3447a3179f9afde385d /arch/x86/lib/msr-smp.c
parent07cde313b2d21f728cec2836db7cdb55476f7a26 (diff)
downloadlinux-67bbd7a8d6bcdc44cc27105ae8c374e9176ceaf1.tar.bz2
x86/cpuid: Allow cpuid_read() to schedule
High latencies can be observed caused by a daemon periodically reading CPUID on all cpus. On KASAN enabled kernels ~10ms latencies can be observed. Even without KASAN, sending an IPI to a CPU, which is in a deep sleep state or in a long hard IRQ disabled section, waiting for the answer can consume hundreds of microseconds. cpuid_read() is invoked in preemptible context, so it can be converted to sleep instead of busy wait. Switching to smp_call_function_single_async() and a completion allows to reschedule and reduces CPU usage and latencies. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Ingo Molnar <mingo@kernel.org> Cc: Hugh Dickins <hughd@google.com> Cc: Borislav Petkov <bp@alien8.de> Cc: Eric Dumazet <eric.dumazet@gmail.com> Link: https://lkml.kernel.org/r/20180323215818.127774-2-edumazet@google.com
Diffstat (limited to 'arch/x86/lib/msr-smp.c')
0 files changed, 0 insertions, 0 deletions