Re: [PATCH 7/8] lib: add fast path for find_next_*_bit()

2021-02-01 Thread Yury Norov
[ CC Alexey Klimov, andRasmus Villemoes as they also may be interested ] On Mon, Feb 1, 2021 at 8:22 AM Andy Shevchenko wrote: > On Mon, Feb 01, 2021 at 04:02:30PM +, David Laight wrote: > > From: Andy Shevchenko > > > Sent: 01 February 2021 13:49 > > > On Sat, Jan 30, 2021 at 11:17:18AM -08

Re: [PATCH 7/8] lib: add fast path for find_next_*_bit()

2021-02-01 Thread 'Andy Shevchenko'
On Mon, Feb 01, 2021 at 04:02:30PM +, David Laight wrote: > From: Andy Shevchenko > > Sent: 01 February 2021 13:49 > > On Sat, Jan 30, 2021 at 11:17:18AM -0800, Yury Norov wrote: > > > Similarly to bitmap functions, find_next_*_bit() users will benefit > > > if we'll handle a case of bitmaps th

RE: [PATCH 7/8] lib: add fast path for find_next_*_bit()

2021-02-01 Thread David Laight
From: Andy Shevchenko > Sent: 01 February 2021 13:49 > > On Sat, Jan 30, 2021 at 11:17:18AM -0800, Yury Norov wrote: > > Similarly to bitmap functions, find_next_*_bit() users will benefit > > if we'll handle a case of bitmaps that fit into a single word. In the > > very best case, the compiler ma

Re: [PATCH 7/8] lib: add fast path for find_next_*_bit()

2021-02-01 Thread Andy Shevchenko
On Sat, Jan 30, 2021 at 11:17:18AM -0800, Yury Norov wrote: > Similarly to bitmap functions, find_next_*_bit() users will benefit > if we'll handle a case of bitmaps that fit into a single word. In the > very best case, the compiler may replace a function call with a > single ffs or ffz instruction

[PATCH 7/8] lib: add fast path for find_next_*_bit()

2021-01-30 Thread Yury Norov
Similarly to bitmap functions, find_next_*_bit() users will benefit if we'll handle a case of bitmaps that fit into a single word. In the very best case, the compiler may replace a function call with a single ffs or ffz instruction. Signed-off-by: Yury Norov --- include/asm-generic/bitops/find.h