Messages in this thread | | | From | Yury Norov <> | Subject | [RFC PATCH 0/2] Switch ARM to generic find_bit() API | Date | Wed, 19 Oct 2022 20:20:22 -0700 |
| |
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
-- 2.34.1
| |