summaryrefslogtreecommitdiff
path: root/lib/nodemask.c
diff options
context:
space:
mode:
authorYury Norov <yury.norov@gmail.com>2022-07-25 19:39:17 +0300
committerYury Norov <yury.norov@gmail.com>2022-08-01 18:13:21 +0300
commit36d4b36b69590fed99356a4426c940a253a93800 (patch)
tree576e489e2045ff13c7e1a39fce8085a97bb7025e /lib/nodemask.c
parent3e731203153de1c06a8b7a4f15061e9051c09a6f (diff)
downloadlinux-36d4b36b69590fed99356a4426c940a253a93800.tar.xz
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>
Diffstat (limited to 'lib/nodemask.c')
-rw-r--r--lib/nodemask.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/lib/nodemask.c b/lib/nodemask.c
index e22647f5181b..b8a433d16b51 100644
--- a/lib/nodemask.c
+++ b/lib/nodemask.c
@@ -3,14 +3,6 @@
#include <linux/module.h>
#include <linux/random.h>
-unsigned int __next_node_in(int node, const nodemask_t *srcp)
-{
- unsigned int ret = __next_node(node, srcp);
-
- if (ret == MAX_NUMNODES)
- ret = __first_node(srcp);
- return ret;
-}
EXPORT_SYMBOL(__next_node_in);
#ifdef CONFIG_NUMA