mirror of
https://github.com/torvalds/linux.git
synced 2024-11-16 17:12:06 +00:00
9d48c7afed
When a CPU is hotplugged while the perf stat -e cycles command is
running, a wrong (very large) value is displayed immediately after the
CPU removal:
Check the values, shouldn't be too high as in
time counts unit events
1.001101919 29261846 cycles
2.002454499 17523405 cycles
3.003659292 24361161 cycles
4.004816983 18446744073638406144 cycles
5.005671647 <not counted> cycles
...
The CPU hotplug off took place after 3 seconds.
The issue is the read of the event count value after 4 seconds when
the CPU is not available and the read of the counter returns an
error. This is treated as a counter value of zero. This results
in a very large value (0 - previous_value).
Fix this by detecting the hotplugged off CPU and report 0 instead
of a very large number.
Cc: stable@vger.kernel.org
Fixes:
|
||
---|---|---|
.. | ||
appldata | ||
boot | ||
configs | ||
crypto | ||
hypfs | ||
include | ||
kernel | ||
kvm | ||
lib | ||
mm | ||
net | ||
pci | ||
purgatory | ||
tools | ||
Kbuild | ||
Kconfig | ||
Kconfig.debug | ||
Makefile |