diff options
| author | Yury Norov [NVIDIA] <[email protected]> | 2025-05-09 16:20:08 +0000 |
|---|---|---|
| committer | Yury Norov <[email protected]> | 2025-05-13 15:40:04 +0000 |
| commit | 895ee6a22e3195b7c1fee140c842bdeedb89ed33 (patch) | |
| tree | ff3267bf545568210ea89b4880652979e50ad08f /tools/testing/selftests/drivers/net/hw/rss_api.py | |
| parent | bitfield: Add FIELD_MODIFY() helper (diff) | |
| download | kernel-895ee6a22e3195b7c1fee140c842bdeedb89ed33.tar.gz kernel-895ee6a22e3195b7c1fee140c842bdeedb89ed33.zip | |
topology: make for_each_node_with_cpus() O(N)
for_each_node_with_cpus() calls nr_cpus_node() at every iteration, which
makes it O(N^2). Kernel tracks such nodes with N_CPU record in node_states
array. Switching to it makes for_each_node_with_cpus() O(N).
Andrea:
Now we can include also offline nodes with CPUs assigned (assuming it's
possible). If checking the online state is required, the user must use
node_online() within the loop.
CC: Andrea Righi <[email protected]>
CC:Tejun Heo <[email protected]>
Signed-off-by: Yury Norov [NVIDIA] <[email protected]>
Diffstat (limited to 'tools/testing/selftests/drivers/net/hw/rss_api.py')
0 files changed, 0 insertions, 0 deletions
