diff options
| author | Yury Norov <[email protected]> | 2022-09-19 21:05:56 +0000 |
|---|---|---|
| committer | Yury Norov <[email protected]> | 2022-10-01 17:22:57 +0000 |
| commit | 6cc18331a987c4a29d66b9c4fd292587fba4d7bd (patch) | |
| tree | ec87f04dbf7cdcb81c4094fa9ad5b9943ecd8de2 /lib/test_bitmap.c | |
| parent | cpumask: switch for_each_cpu{,_not} to use for_each_bit() (diff) | |
| download | kernel-6cc18331a987c4a29d66b9c4fd292587fba4d7bd.tar.gz kernel-6cc18331a987c4a29d66b9c4fd292587fba4d7bd.zip | |
lib/find_bit: add find_next{,_and}_bit_wrap
The helper is better optimized for the worst case: in case of empty
cpumask, current code traverses 2 * size:
next = cpumask_next_and(prev, src1p, src2p);
if (next >= nr_cpu_ids)
next = cpumask_first_and(src1p, src2p);
At bitmap level we can stop earlier after checking 'size + offset' bits.
Signed-off-by: Yury Norov <[email protected]>
Diffstat (limited to 'lib/test_bitmap.c')
0 files changed, 0 insertions, 0 deletions
