Linux-Next discussions
 help / color / mirror / Atom feed
* linux-next: manual merge of the bcachefs tree with the mm-unstable tree
@ 2025-08-19  1:12 Stephen Rothwell
  2025-08-19  2:29 ` Andrew Morton
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Rothwell @ 2025-08-19  1:12 UTC (permalink / raw)
  To: Kent Overstreet, Andrew Morton
  Cc: Linux Kernel Mailing List, Linux Next Mailing List, Vitaly Wool

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

Hi all,

Today's linux-next merge of the bcachefs tree got a conflict in:

  fs/bcachefs/darray.c

between commit:

  97b75b7e275a ("mm/slub: allow to set node and align in k[v]realloc")

from the mm-unstable tree and commit:

  808708fe9da0 ("bcachefs: darray_make_room_rcu()")

from the bcachefs 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 fs/bcachefs/darray.c
index 928e83a1ce42,6940037bd19e..000000000000
--- a/fs/bcachefs/darray.c
+++ b/fs/bcachefs/darray.c
@@@ -20,10 -22,11 +22,11 @@@ int __bch2_darray_resize_noprof(darray_
  		if (unlikely(check_mul_overflow(new_size, element_size, &bytes)))
  			return -ENOMEM;
  
- 		void *data = likely(bytes < INT_MAX)
+ 		void *old = d->data;
+ 		void *new = likely(bytes < INT_MAX)
 -			? kvmalloc_noprof(bytes, gfp)
 +			? kvmalloc_node_align_noprof(bytes, 1, gfp, NUMA_NO_NODE)
  			: vmalloc_noprof(bytes);
- 		if (!data)
+ 		if (!new)
  			return -ENOMEM;
  
  		if (d->size)

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

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

* Re: linux-next: manual merge of the bcachefs tree with the mm-unstable tree
  2025-08-19  1:12 linux-next: manual merge of the bcachefs tree with the mm-unstable tree Stephen Rothwell
@ 2025-08-19  2:29 ` Andrew Morton
  2025-08-19  2:36   ` Kent Overstreet
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Morton @ 2025-08-19  2:29 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Kent Overstreet, Linux Kernel Mailing List,
	Linux Next Mailing List, Vitaly Wool

On Tue, 19 Aug 2025 11:12:28 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> Hi all,
> 
> Today's linux-next merge of the bcachefs tree got a conflict in:
> 
>   fs/bcachefs/darray.c
> 
> between commit:
> 
>   97b75b7e275a ("mm/slub: allow to set node and align in k[v]realloc")
> 
> from the mm-unstable tree and commit:
> 
>   808708fe9da0 ("bcachefs: darray_make_room_rcu()")
> 
> from the bcachefs tree.
> 
> ...
>
> --- a/fs/bcachefs/darray.c
> +++ b/fs/bcachefs/darray.c
> @@@ -20,10 -22,11 +22,11 @@@ int __bch2_darray_resize_noprof(darray_
>   		if (unlikely(check_mul_overflow(new_size, element_size, &bytes)))
>   			return -ENOMEM;
>   
> - 		void *data = likely(bytes < INT_MAX)
> + 		void *old = d->data;
> + 		void *new = likely(bytes < INT_MAX)
>  -			? kvmalloc_noprof(bytes, gfp)
>  +			? kvmalloc_node_align_noprof(bytes, 1, gfp, NUMA_NO_NODE)
>   			: vmalloc_noprof(bytes);
> - 		if (!data)
> + 		if (!new)
>   			return -ENOMEM;

uh, OK, I guess a 2GB allocation is reasonable on a 16TB machine.

But why does bcachefs find it necessary to bypass allocation profiling?

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

* Re: linux-next: manual merge of the bcachefs tree with the mm-unstable tree
  2025-08-19  2:29 ` Andrew Morton
@ 2025-08-19  2:36   ` Kent Overstreet
  0 siblings, 0 replies; 3+ messages in thread
From: Kent Overstreet @ 2025-08-19  2:36 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Stephen Rothwell, Linux Kernel Mailing List,
	Linux Next Mailing List, Vitaly Wool

On Mon, Aug 18, 2025 at 07:29:41PM -0700, Andrew Morton wrote:
> On Tue, 19 Aug 2025 11:12:28 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> 
> > Hi all,
> > 
> > Today's linux-next merge of the bcachefs tree got a conflict in:
> > 
> >   fs/bcachefs/darray.c
> > 
> > between commit:
> > 
> >   97b75b7e275a ("mm/slub: allow to set node and align in k[v]realloc")
> > 
> > from the mm-unstable tree and commit:
> > 
> >   808708fe9da0 ("bcachefs: darray_make_room_rcu()")
> > 
> > from the bcachefs tree.
> > 
> > ...
> >
> > --- a/fs/bcachefs/darray.c
> > +++ b/fs/bcachefs/darray.c
> > @@@ -20,10 -22,11 +22,11 @@@ int __bch2_darray_resize_noprof(darray_
> >   		if (unlikely(check_mul_overflow(new_size, element_size, &bytes)))
> >   			return -ENOMEM;
> >   
> > - 		void *data = likely(bytes < INT_MAX)
> > + 		void *old = d->data;
> > + 		void *new = likely(bytes < INT_MAX)
> >  -			? kvmalloc_noprof(bytes, gfp)
> >  +			? kvmalloc_node_align_noprof(bytes, 1, gfp, NUMA_NO_NODE)
> >   			: vmalloc_noprof(bytes);
> > - 		if (!data)
> > + 		if (!new)
> >   			return -ENOMEM;
> 
> uh, OK, I guess a 2GB allocation is reasonable on a 16TB machine.

yeah, already had that argument with Linus :) journals get big these
days...

> But why does bcachefs find it necessary to bypass allocation profiling?

Not bypassing, darray is a generic container that's used all over the
place, I have it wrapped so that allocations are tagged to the proper
callsite. Been doing that with various random containers, makes it dead
easy to chase down leaks and I don't have to ask users to compile custom
kernels.

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

end of thread, other threads:[~2025-08-19  2:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-19  1:12 linux-next: manual merge of the bcachefs tree with the mm-unstable tree Stephen Rothwell
2025-08-19  2:29 ` Andrew Morton
2025-08-19  2:36   ` Kent Overstreet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox