linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/2] Switch ARM to generic find_bit() API
@ 2022-10-20  3:20 Yury Norov
  2022-10-20  3:20 ` [PATCH 1/2] bitmap: add sanity check function for find_bit() Yury Norov
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Yury Norov @ 2022-10-20  3:20 UTC (permalink / raw)
  To: Russell King (Oracle),
	Catalin Marinas, Mark Rutland, Will Deacon, linux-arm-kernel
  Cc: Yury Norov, Linux Kernel Mailing List, Alexey Klimov,
	Andy Shevchenko, Andy Whitcroft, Dennis Zhou, Geert Uytterhoeven,
	Guenter Roeck, Kees Cook, Linus Torvalds, Rasmus Villemoes

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


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2022-11-14 12:02 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-20  3:20 [RFC PATCH 0/2] Switch ARM to generic find_bit() API Yury Norov
2022-10-20  3:20 ` [PATCH 1/2] bitmap: add sanity check function for find_bit() Yury Norov
2022-10-23 22:19   ` Linus Torvalds
2022-10-25 17:11     ` Yury Norov
2022-10-25 18:26       ` Russell King (Oracle)
2022-10-25 18:38         ` Linus Torvalds
2022-11-14 11:59           ` Russell King (Oracle)
2022-10-20  3:20 ` [PATCH 2/2] arm: drop arch implementation for find_bit() functions Yury Norov
2022-10-20 16:51 ` [RFC PATCH 0/2] Switch ARM to generic find_bit() API Russell King (Oracle)
2022-10-20 20:02   ` Yury Norov
2022-10-20 22:55     ` Russell King (Oracle)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).