]> git.baikalelectronics.ru Git - kernel.git/commit
lib/nodemask: inline next_node_in() and node_random()
authorYury Norov <yury.norov@gmail.com>
Mon, 25 Jul 2022 16:39:17 +0000 (09:39 -0700)
committerYury Norov <yury.norov@gmail.com>
Mon, 1 Aug 2022 15:13:21 +0000 (08:13 -0700)
commite53f8adb66547b7bf520f1d35b0a9f324fa0d1c3
tree576e489e2045ff13c7e1a39fce8085a97bb7025e
parentea389c7c557c41db2422a35e14f34ef165aa53d3
lib/nodemask: inline next_node_in() and node_random()

The functions are pretty thin wrappers around find_bit engine, and
keeping them in c-file prevents compiler from small_const_nbits()
optimization, which must take place for all systems with MAX_NUMNODES
less than BITS_PER_LONG (default is 16 for me).

Moving them to header file doesn't blow up the kernel size:
add/remove: 1/2 grow/shrink: 9/5 up/down: 968/-88 (880)

CC: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>
CC: Michael Ellerman <mpe@ellerman.id.au>
CC: Paul Mackerras <paulus@samba.org>
CC: Rasmus Villemoes <linux@rasmusvillemoes.dk>
CC: Stephen Rothwell <sfr@canb.auug.org.au>
CC: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Yury Norov <yury.norov@gmail.com>
MAINTAINERS
include/linux/nodemask.h
lib/Makefile
lib/nodemask.c