diff options
author | Geert Uytterhoeven <geert+renesas@glider.be> | 2023-03-15 17:28:17 +0300 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2023-03-24 03:18:35 +0300 |
commit | 13684e966d46283e0e89b6a4941596dc52b18bf3 (patch) | |
tree | 7ffbe1f8f6278b4d7b7cae40c62b3657bb604c65 /tools/perf/scripts/python/check-perf-trace.py | |
parent | d2e44a50ecebb72257e5deb7ce8d227d7e3f53b9 (diff) | |
download | linux-13684e966d46283e0e89b6a4941596dc52b18bf3.tar.xz |
lib: dhry: fix unstable smp_processor_id(_) usage
When running the in-kernel Dhrystone benchmark with
CONFIG_DEBUG_PREEMPT=y:
BUG: using smp_processor_id() in preemptible [00000000] code: bash/938
Fix this by not using smp_processor_id() directly, but instead wrapping
the whole benchmark inside a get_cpu()/put_cpu() pair. This makes sure
the whole benchmark is run on the same CPU core, and the reported values
are consistent.
Link: https://lkml.kernel.org/r/b0d29932bb24ad82cea7f821e295c898e9657be0.1678890070.git.geert+renesas@glider.be
Fixes: d5528cc16893f1f6 ("lib: add Dhrystone benchmark test")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reported-by: Tobias Klausmann <klausman@schwarzvogel.de>
Link: https://bugzilla.kernel.org/show_bug.cgi?id=217179
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'tools/perf/scripts/python/check-perf-trace.py')
0 files changed, 0 insertions, 0 deletions