diff options
author | 2022-02-02 15:42:36 -0800 | |
---|---|---|
committer | 2022-02-08 10:13:12 -0800 | |
commit | 2bcd18e041fc3c2ae58f41eb5e18790c7c82c674 (patch) | |
tree | 22b3902e5c6535584432304cb9d20dafe27853f9 /tools/perf/scripts/python/export-to-sqlite.py | |
parent | rcu-tasks: Fix computation of CPU-to-list shift counts (diff) | |
download | wireguard-linux-2bcd18e041fc3c2ae58f41eb5e18790c7c82c674.tar.xz wireguard-linux-2bcd18e041fc3c2ae58f41eb5e18790c7c82c674.zip |
rcu-tasks: Use order_base_2() instead of ilog2()
The ilog2() function can be used to generate a shift count, but it will
generate the same count for a power of two as for one greater than a power
of two. This results in shift counts that are larger than necessary for
systems with a power-of-two number of CPUs because the CPUs are numbered
from zero, so that the maximum CPU number is one less than that power
of two.
This commit therefore substitutes order_base_2(), which appears to have
been designed for exactly this use case.
Suggested-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions