RFC Switch ARM to generic find_bit() API
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest2 patches 8 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | bitmap: add sanity check function for find_bit()include/ lib/ | +42 | 5 replies | |
| 2/2 | arm: drop arch implementation for find_bit() functionsarch/ arch/ arch/ +1 more | +1 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [RFC PATCH 0/2] Switch ARM to generic find_bit() API
Hi Russell, all,
I'd like to respin a patch that switches ARM to generic find_bit() functions.
Generic code works on par with arch or better, according to my testing [1], and with recent improvements merged in v6.1, it should be even faster.
ARM already uses many generic find_bit() functions - those that it doesn't implement. So we are talking about migrating a subset of the API; most of find_bit() family has only generic implementation on ARM.
The only concern about this migration is that ARM code supports byte-aligned bitmap addresses, while generic code is optimized for word-aligned bitmaps.
In my practice, I've never seen unaligned bitmaps. But to check that on ARM, I added a run-time check for bitmap alignment. I gave it run on several architectures and found nothing.
Can you please check that on your hardware and compare performance of generic vs arch code for you? If everything is OK, I suggest switching ARM to generic find_bit() completely.
Thanks,
Yury
[1] https://lore.kernel.org/all/YuWk3titnOiQACzC@yury-laptop/
Yury Norov (2):
bitmap: add sanity check function for find_bit()
arm: drop arch implementation for find_bit() functions
arch/arm/include/asm/bitops.h | 63 ----------- arch/arm/kernel/armksyms.c | 11 -- arch/arm/lib/Makefile | 2 +- arch/arm/lib/findbit.S | 193 ---------------------------------- include/linux/find.h | 35 ++++++ lib/Kconfig.debug | 7 ++ 6 files changed, 43 insertions(+), 268 deletions(-) delete mode 100644 arch/arm/lib/findbit.S
Signature · 1 line
2.34.1