[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220927192650.516143-1-broonie@kernel.org>
Date: Tue, 27 Sep 2022 20:26:49 +0100
From: broonie@...nel.org
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: "Aneesh Kumar K . V" <aneesh.kumar@...ux.ibm.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linux Next Mailing List <linux-next@...r.kernel.org>,
Yury Norov <yury.norov@...il.com>
Subject: linux-next: manual merge of the mm-stable tree with the bitmap tree
Hi all,
Today's linux-next merge of the mm-stable tree got a conflict in:
include/linux/nodemask.h
between commit:
97848c10f9f8a ("lib/bitmap: remove bitmap_ord_to_pos")
from the bitmap tree and commit:
3e061d924fe9c ("lib/nodemask: optimize node_random for nodemask with single NUMA node")
from the mm-stable tree.
I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.
diff --cc include/linux/nodemask.h
index 0c45fb066caa7,e66742db741cf..0000000000000
--- a/include/linux/nodemask.h
+++ b/include/linux/nodemask.h
@@@ -504,11 -505,21 +505,20 @@@ static inline int num_node_state(enum n
static inline int node_random(const nodemask_t *maskp)
{
#if defined(CONFIG_NUMA) && (MAX_NUMNODES > 1)
- int w, bit = NUMA_NO_NODE;
+ int w, bit;
w = nodes_weight(*maskp);
- if (w)
+ switch (w) {
+ case 0:
+ bit = NUMA_NO_NODE;
+ break;
+ case 1:
+ bit = first_node(*maskp);
+ break;
+ default:
- bit = bitmap_ord_to_pos(maskp->bits,
- get_random_int() % w, MAX_NUMNODES);
+ bit = find_nth_bit(maskp->bits, MAX_NUMNODES, get_random_int() % w);
+ break;
+ }
return bit;
#else
return 0;
Powered by blists - more mailing lists