linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: manual merge of the mm-stable tree with the bitmap tree
@ 2022-09-27 19:26 broonie
  2022-09-27 19:38 ` Yury Norov
  0 siblings, 1 reply; 3+ messages in thread
From: broonie @ 2022-09-27 19:26 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Aneesh Kumar K . V, Linux Kernel Mailing List,
	Linux Next Mailing List, Yury Norov

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;

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: linux-next: manual merge of the mm-stable tree with the bitmap tree
  2022-09-27 19:26 linux-next: manual merge of the mm-stable tree with the bitmap tree broonie
@ 2022-09-27 19:38 ` Yury Norov
  2022-09-27 19:55   ` Mark Brown
  0 siblings, 1 reply; 3+ messages in thread
From: Yury Norov @ 2022-09-27 19:38 UTC (permalink / raw)
  To: broonie
  Cc: Andrew Morton, Aneesh Kumar K . V, Linux Kernel Mailing List,
	Linux Next Mailing List

On Tue, Sep 27, 2022 at 08:26:49PM +0100, broonie@kernel.org wrote:
> 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.

The fix is correct. I sent the updated patch to Stephen, and
apparently had to CC you. Thanks.

> 
> 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;

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: linux-next: manual merge of the mm-stable tree with the bitmap tree
  2022-09-27 19:38 ` Yury Norov
@ 2022-09-27 19:55   ` Mark Brown
  0 siblings, 0 replies; 3+ messages in thread
From: Mark Brown @ 2022-09-27 19:55 UTC (permalink / raw)
  To: Yury Norov
  Cc: Andrew Morton, Aneesh Kumar K . V, Linux Kernel Mailing List,
	Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 580 bytes --]

On Tue, Sep 27, 2022 at 12:38:09PM -0700, Yury Norov wrote:
> On Tue, Sep 27, 2022 at 08:26:49PM +0100, broonie@kernel.org wrote:

> > 
> >   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.
> 
> The fix is correct. I sent the updated patch to Stephen, and
> apparently had to CC you. Thanks.

Normally it's Stephen, but he's off most of this week so I'm trying
provide some cover.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-09-27 19:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-27 19:26 linux-next: manual merge of the mm-stable tree with the bitmap tree broonie
2022-09-27 19:38 ` Yury Norov
2022-09-27 19:55   ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).