Hi all,
Today's linux-next merge of the bpf-next tree got a conflict in:
mm/page_owner.c
between commit:
a5bc091881fd ("mm: page_owner: use new iteration API")
from the mm-unstable branch of the mm tree and commit:
8c57b687e833 ("mm, bpf: Introduce free_pages_nolock()")
from the bpf-next 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 mm/page_owner.c
index 849d4a471b6c,90e31d0e3ed7..000000000000
--- a/mm/page_owner.c
+++ b/mm/page_owner.c
@@@ -297,11 -293,17 +297,17 @@@ void __reset_page_owner(struct page *pa
page_owner = get_page_owner(page_ext);
alloc_handle = page_owner->handle;
+ page_ext_put(page_ext);
- handle = save_stack(GFP_NOWAIT | __GFP_NOWARN);
+ /*
+ * Do not specify GFP_NOWAIT to make gfpflags_allow_spinning() == false
+ * to prevent issues in stack_depot_save().
+ * This is similar to try_alloc_pages() gfp flags, but only used
+ * to signal stack_depot to avoid spin_locks.
+ */
+ handle = save_stack(__GFP_NOWARN);
- __update_page_owner_free_handle(page_ext, handle, order, current->pid,
+ __update_page_owner_free_handle(page, handle, order, current->pid,
current->tgid, free_ts_nsec);
- page_ext_put(page_ext);
if (alloc_handle != early_handle)
/*
Hi all,
On Tue, 11 Mar 2025 12:04:22 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Today's linux-next merge of the bpf-next tree got a conflict in:
>
> mm/page_owner.c
>
> between commit:
>
> a5bc091881fd ("mm: page_owner: use new iteration API")
>
> from the mm-unstable branch of the mm tree and commit:
>
> 8c57b687e833 ("mm, bpf: Introduce free_pages_nolock()")
>
> from the bpf-next 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 mm/page_owner.c
> index 849d4a471b6c,90e31d0e3ed7..000000000000
> --- a/mm/page_owner.c
> +++ b/mm/page_owner.c
> @@@ -297,11 -293,17 +297,17 @@@ void __reset_page_owner(struct page *pa
>
> page_owner = get_page_owner(page_ext);
> alloc_handle = page_owner->handle;
> + page_ext_put(page_ext);
>
> - handle = save_stack(GFP_NOWAIT | __GFP_NOWARN);
> + /*
> + * Do not specify GFP_NOWAIT to make gfpflags_allow_spinning() == false
> + * to prevent issues in stack_depot_save().
> + * This is similar to try_alloc_pages() gfp flags, but only used
> + * to signal stack_depot to avoid spin_locks.
> + */
> + handle = save_stack(__GFP_NOWARN);
> - __update_page_owner_free_handle(page_ext, handle, order, current->pid,
> + __update_page_owner_free_handle(page, handle, order, current->pid,
> current->tgid, free_ts_nsec);
> - page_ext_put(page_ext);
>
> if (alloc_handle != early_handle)
> /*
This is now a conflict between the mm-stable tree and Linus' tree.
--
Cheers,
Stephen Rothwell
On 2025-03-30 19:27, Stephen Rothwell wrote:
> Hi all,
>
> On Tue, 11 Mar 2025 12:04:22 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>>
>> Today's linux-next merge of the bpf-next tree got a conflict in:
>>
>> mm/page_owner.c
>>
>> between commit:
>>
>> a5bc091881fd ("mm: page_owner: use new iteration API")
>>
>> from the mm-unstable branch of the mm tree and commit:
>>
>> 8c57b687e833 ("mm, bpf: Introduce free_pages_nolock()")
>>
>> from the bpf-next 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 mm/page_owner.c
>> index 849d4a471b6c,90e31d0e3ed7..000000000000
>> --- a/mm/page_owner.c
>> +++ b/mm/page_owner.c
>> @@@ -297,11 -293,17 +297,17 @@@ void __reset_page_owner(struct page *pa
>>
>> page_owner = get_page_owner(page_ext);
>> alloc_handle = page_owner->handle;
>> + page_ext_put(page_ext);
>>
>> - handle = save_stack(GFP_NOWAIT | __GFP_NOWARN);
>> + /*
>> + * Do not specify GFP_NOWAIT to make gfpflags_allow_spinning() == false
>> + * to prevent issues in stack_depot_save().
>> + * This is similar to try_alloc_pages() gfp flags, but only used
>> + * to signal stack_depot to avoid spin_locks.
>> + */
>> + handle = save_stack(__GFP_NOWARN);
>> - __update_page_owner_free_handle(page_ext, handle, order, current->pid,
>> + __update_page_owner_free_handle(page, handle, order, current->pid,
>> current->tgid, free_ts_nsec);
>> - page_ext_put(page_ext);
>>
>> if (alloc_handle != early_handle)
>> /*
>
> This is now a conflict between the mm-stable tree and Linus' tree.
What's the best way to resolve this? Should I post again or can we just use your fix?
On Mon, 31 Mar 2025 10:19:34 -0400 Luiz Capitulino <luizcap@redhat.com> wrote: > >> - page_ext_put(page_ext); > >> > >> if (alloc_handle != early_handle) > >> /* > > > > This is now a conflict between the mm-stable tree and Linus' tree. > > What's the best way to resolve this? Should I post again or can we just use your fix? It's in Linus's hands now...
On Tue, 11 Mar 2025 12:04:22 +1100
Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> Hi all,
>
> Today's linux-next merge of the bpf-next tree got a conflict in:
>
> mm/page_owner.c
>
> between commit:
>
> a5bc091881fd ("mm: page_owner: use new iteration API")
>
> from the mm-unstable branch of the mm tree and commit:
>
> 8c57b687e833 ("mm, bpf: Introduce free_pages_nolock()")
>
> from the bpf-next 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.
>
This looks good to me:
Reviewed-by: Luiz Capitulino <luizcap@redhat.com>
> --
> Cheers,
> Stephen Rothwell
>
> diff --cc mm/page_owner.c
> index 849d4a471b6c,90e31d0e3ed7..000000000000
> --- a/mm/page_owner.c
> +++ b/mm/page_owner.c
> @@@ -297,11 -293,17 +297,17 @@@ void __reset_page_owner(struct page *pa
>
> page_owner = get_page_owner(page_ext);
> alloc_handle = page_owner->handle;
> + page_ext_put(page_ext);
>
> - handle = save_stack(GFP_NOWAIT | __GFP_NOWARN);
> + /*
> + * Do not specify GFP_NOWAIT to make gfpflags_allow_spinning() == false
> + * to prevent issues in stack_depot_save().
> + * This is similar to try_alloc_pages() gfp flags, but only used
> + * to signal stack_depot to avoid spin_locks.
> + */
> + handle = save_stack(__GFP_NOWARN);
> - __update_page_owner_free_handle(page_ext, handle, order, current->pid,
> + __update_page_owner_free_handle(page, handle, order, current->pid,
> current->tgid, free_ts_nsec);
> - page_ext_put(page_ext);
>
> if (alloc_handle != early_handle)
> /*
On Tue, Mar 11, 2025 at 2:30 PM Luiz Capitulino <luizcap@redhat.com> wrote:
>
> On Tue, 11 Mar 2025 12:04:22 +1100
> Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> > Hi all,
> >
> > Today's linux-next merge of the bpf-next tree got a conflict in:
> >
> > mm/page_owner.c
> >
> > between commit:
> >
> > a5bc091881fd ("mm: page_owner: use new iteration API")
> >
> > from the mm-unstable branch of the mm tree and commit:
> >
> > 8c57b687e833 ("mm, bpf: Introduce free_pages_nolock()")
> >
> > from the bpf-next 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.
> >
>
> This looks good to me:
>
> Reviewed-by: Luiz Capitulino <luizcap@redhat.com>
Looks good to me as well.
Thanks
© 2016 - 2026 Red Hat, Inc.