Merge tag 'bitmap-6.1-rc1' of https://github.com/norov/linux
Pull bitmap updates from Yury Norov: - Fix unsigned comparison to -1 in CPUMAP_FILE_MAX_BYTES (Phil Auld) - cleanup nr_cpu_ids vs nr_cpumask_bits mess (me) This series cleans that mess and adds new config FORCE_NR_CPUS that allows to optimize cpumask subsystem if the number of CPUs is known at compile-time. - optimize find_bit() functions (me) Reworks find_bit() functions based on new FIND_{FIRST,NEXT}_BIT() macros. - add find_nth_bit() (me) Adds find_nth_bit(), which is ~70 times faster than bitcounting with for_each() loop: for_each_set_bit(bit, mask, size) if (n-- == 0) return bit; Also adds bitmap_weight_and() to let people replace this pattern: tmp = bitmap_alloc(nbits); bitmap_and(tmp, map1, map2, nbits); weight = bitmap_weight(tmp, nbits); bitmap_free(tmp); with a single bitmap_weight_and() call. - repair cpumask_check() (me) After switching cpumask to use nr_cpu_ids, cpumask_check() started generating many false-positive warnings. This series fixes it. - Add for_each_cpu_andnot() and for_each_cpu_andnot() (Valentin Schneider) Extends the API with one more function and applies it in sched/core. * tag 'bitmap-6.1-rc1' of https://github.com/norov/linux: (28 commits) sched/core: Merge cpumask_andnot()+for_each_cpu() into for_each_cpu_andnot() lib/test_cpumask: Add for_each_cpu_and(not) tests cpumask: Introduce for_each_cpu_andnot() lib/find_bit: Introduce find_next_andnot_bit() cpumask: fix checking valid cpu range lib/bitmap: add tests for for_each() loops lib/find: optimize for_each() macros lib/bitmap: introduce for_each_set_bit_wrap() macro lib/find_bit: add find_next{,_and}_bit_wrap cpumask: switch for_each_cpu{,_not} to use for_each_bit() net: fix cpu_max_bits_warn() usage in netif_attrmask_next{,_and} cpumask: add cpumask_nth_{,and,andnot} lib/bitmap: remove bitmap_ord_to_pos lib/bitmap: add tests for find_nth_bit() lib: add find_nth{,_and,_andnot}_bit() lib/bitmap: add bitmap_weight_and() lib/bitmap: don't call __bitmap_weight() in kernel code tools: sync find_bit() implementation lib/find_bit: optimize find_next_bit() functions lib/find_bit: create find_first_zero_bit_le() ...
No related branches found
No related tags found
Showing
- arch/loongarch/kernel/setup.c 1 addition, 1 deletionarch/loongarch/kernel/setup.c
- arch/mips/kernel/setup.c 1 addition, 1 deletionarch/mips/kernel/setup.c
- arch/powerpc/kernel/head_64.S 4 additions, 0 deletionsarch/powerpc/kernel/head_64.S
- arch/x86/kernel/smpboot.c 2 additions, 2 deletionsarch/x86/kernel/smpboot.c
- arch/x86/xen/smp_pv.c 1 addition, 1 deletionarch/x86/xen/smp_pv.c
- fs/ntfs3/bitmap.c 2 additions, 2 deletionsfs/ntfs3/bitmap.c
- include/linux/bitmap.h 12 additions, 1 deletioninclude/linux/bitmap.h
- include/linux/bitops.h 19 additions, 0 deletionsinclude/linux/bitops.h
- include/linux/cpumask.h 97 additions, 35 deletionsinclude/linux/cpumask.h
- include/linux/find.h 269 additions, 41 deletionsinclude/linux/find.h
- include/linux/netdevice.h 4 additions, 6 deletionsinclude/linux/netdevice.h
- include/linux/nodemask.h 1 addition, 2 deletionsinclude/linux/nodemask.h
- kernel/sched/core.c 1 addition, 4 deletionskernel/sched/core.c
- kernel/smp.c 4 additions, 2 deletionskernel/smp.c
- lib/Kconfig 9 additions, 0 deletionslib/Kconfig
- lib/bitmap.c 25 additions, 43 deletionslib/bitmap.c
- lib/cpumask.c 16 additions, 24 deletionslib/cpumask.c
- lib/cpumask_kunit.c 19 additions, 0 deletionslib/cpumask_kunit.c
- lib/find_bit.c 161 additions, 72 deletionslib/find_bit.c
- lib/find_bit_benchmark.c 18 additions, 0 deletionslib/find_bit_benchmark.c
Loading
Please register or sign in to comment