lkml.org 
[lkml]   [2021]   [Jan]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 0/6] lib/find_bit: fast path for small bitmaps
On Fri, Jan 29, 2021 at 12:45 PM Yury Norov <yury.norov@gmail.com> wrote:
>
> Bitmap operations are much simpler and faster in case of small bitmaps, whicn
> fit into a single word. In linux/bitmap.h we have a machinery that allows
> compiler to replace actual function call with a few instructions if bitmaps
> passed into the function is small and its size is known at compile time.
>
> find_*_bit() API lacks this functionality; despite users will benefit from it
> a lot. One important example is cpumask subsystem, when NR_CPUS <= BITS_PER_LONG.
> In the very best case, the compiler may replace a find_*_bit() call for such a
> bitmap with a single ffs or ffz instruction.
>
> Tools is synchronized with new implementation where needed.

Sorry for the broken enumeration . If it's too confusing, please let me know
and I'll resend.

\
 
 \ /
  Last update: 2021-01-29 21:56    [W:0.111 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site