From: Stephen Rothwell <sfr@canb•auug.org.au>
To: Andrew Morton <akpm@linux-foundation•org>,
Theodore Ts'o <tytso@mit•edu>,
"Jason A. Donenfeld" <Jason@zx2c4•com>
Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux•ibm.com>,
Linux Kernel Mailing List <linux-kernel@vger•kernel.org>,
Linux Next Mailing List <linux-next@vger•kernel.org>
Subject: linux-next: manual merge of the mm-stable tree with the random tree
Date: Fri, 7 Oct 2022 16:55:48 +1100 [thread overview]
Message-ID: <20221007165548.0b07e256@canb.auug.org.au> (raw)
[-- Attachment #1: Type: text/plain, Size: 1539 bytes --]
Hi all,
Today's linux-next merge of the mm-stable tree got a conflict in:
include/linux/nodemask.h
between commit:
82f33a32b4d2 ("treewide: use prandom_u32_max() when possible")
from the random tree and commit:
3e061d924fe9 ("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.
--
Cheers,
Stephen Rothwell
diff --cc include/linux/nodemask.h
index 6f8a09e41cec,e66742db741c..000000000000
--- 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, prandom_u32_max(w));
+ break;
+ }
return bit;
#else
return 0;
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next reply other threads:[~2022-10-07 5:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-07 5:55 Stephen Rothwell [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-10-07 6:05 linux-next: manual merge of the mm-stable tree with the random tree Stephen Rothwell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221007165548.0b07e256@canb.auug.org.au \
--to=sfr@canb$(echo .)auug.org.au \
--cc=Jason@zx2c4$(echo .)com \
--cc=akpm@linux-foundation$(echo .)org \
--cc=aneesh.kumar@linux$(echo .)ibm.com \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-next@vger$(echo .)kernel.org \
--cc=tytso@mit$(echo .)edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox