diff options
author | 2023-10-06 12:25:18 +0200 | |
---|---|---|
committer | 2023-10-09 12:21:23 +0200 | |
commit | f4bb5705114530cd775a5a649b666755b3efe7aa (patch) | |
tree | 0c63fcda0feec0a08bae86c60ae4acbd5858f980 /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | sched/nohz: Use consistent variable names in find_new_ilb() and kick_ilb() (diff) | |
download | wireguard-linux-f4bb5705114530cd775a5a649b666755b3efe7aa.tar.xz wireguard-linux-f4bb5705114530cd775a5a649b666755b3efe7aa.zip |
sched/nohz: Remove unnecessarily complex error handling pattern from find_new_ilb()
find_new_ilb() returns nr_cpu_ids on failure - which is the usual
cpumask bitops return pattern, but is weird & unnecessary in this
context: not only is it a global variable, it it is a +1 out of
bounds CPU index and also has different signedness ...
Its only user, kick_ilb(), then checks the return against nr_cpu_ids
to decide to return. There's no other use.
So instead of this, use a standard -1 return on failure to find an
idle CPU, as the argument is signed already.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Joel Fernandes (Google) <joel@joelfernandes.org>
Link: https://lore.kernel.org/r/20231006102518.2452758-4-mingo@kernel.org
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions