* linux-next: manual merge of the bpf-next tree with the mm-unstable tree
@ 2026-01-05 2:04 Stephen Rothwell
2026-01-06 2:15 ` Alexei Starovoitov
0 siblings, 1 reply; 5+ messages in thread
From: Stephen Rothwell @ 2026-01-05 2:04 UTC (permalink / raw)
To: Daniel Borkmann, Alexei Starovoitov, Andrii Nakryiko,
Andrew Morton
Cc: bpf, Networking, Chen Ridong, JP Kobryn,
Linux Kernel Mailing List, Linux Next Mailing List,
Roman Gushchin
[-- Attachment #1: Type: text/plain, Size: 1466 bytes --]
Hi all,
Today's linux-next merge of the bpf-next tree got a semantic conflict in:
include/linux/memcontrol.h
mm/memcontrol-v1.c
mm/memcontrol.c
between commit:
eb557e10dcac ("memcg: move mem_cgroup_usage memcontrol-v1.c")
from the mm-unstable tree and commit:
99430ab8b804 ("mm: introduce BPF kfuncs to access memcg statistics and events")
from the bpf-next tree producing this build failure:
mm/memcontrol-v1.c:430:22: error: static declaration of 'mem_cgroup_usage' follows non-static declaration
430 | static unsigned long mem_cgroup_usage(struct mem_cgroup *memcg, bool swap)
| ^~~~~~~~~~~~~~~~
In file included from mm/memcontrol-v1.c:3:
include/linux/memcontrol.h:953:15: note: previous declaration of 'mem_cgroup_usage' with type 'long unsigned int(struct mem_cgroup *, bool)' {aka 'long unsigned int(struct mem_cgroup *, _Bool)'}
953 | unsigned long mem_cgroup_usage(struct mem_cgroup *memcg, bool swap);
| ^~~~~~~~~~~~~~~~
I fixed it up (I reverted the mm-unstable tree commit) 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
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: linux-next: manual merge of the bpf-next tree with the mm-unstable tree 2026-01-05 2:04 linux-next: manual merge of the bpf-next tree with the mm-unstable tree Stephen Rothwell @ 2026-01-06 2:15 ` Alexei Starovoitov 2026-01-06 2:44 ` Chen Ridong 2026-01-06 4:23 ` Roman Gushchin 0 siblings, 2 replies; 5+ messages in thread From: Alexei Starovoitov @ 2026-01-06 2:15 UTC (permalink / raw) To: Stephen Rothwell Cc: Daniel Borkmann, Alexei Starovoitov, Andrii Nakryiko, Andrew Morton, bpf, Networking, Chen Ridong, JP Kobryn, Linux Kernel Mailing List, Linux Next Mailing List, Roman Gushchin On Sun, Jan 4, 2026 at 6:04 PM Stephen Rothwell <sfr@canb.auug.org.au> wrote: > > Hi all, > > Today's linux-next merge of the bpf-next tree got a semantic conflict in: > > include/linux/memcontrol.h > mm/memcontrol-v1.c > mm/memcontrol.c > > between commit: > > eb557e10dcac ("memcg: move mem_cgroup_usage memcontrol-v1.c") > > from the mm-unstable tree and commit: > > 99430ab8b804 ("mm: introduce BPF kfuncs to access memcg statistics and events") > > from the bpf-next tree producing this build failure: > > mm/memcontrol-v1.c:430:22: error: static declaration of 'mem_cgroup_usage' follows non-static declaration > 430 | static unsigned long mem_cgroup_usage(struct mem_cgroup *memcg, bool swap) > | ^~~~~~~~~~~~~~~~ > In file included from mm/memcontrol-v1.c:3: > include/linux/memcontrol.h:953:15: note: previous declaration of 'mem_cgroup_usage' with type 'long unsigned int(struct mem_cgroup *, bool)' {aka 'long unsigned int(struct mem_cgroup *, _Bool)'} > 953 | unsigned long mem_cgroup_usage(struct mem_cgroup *memcg, bool swap); > | ^~~~~~~~~~~~~~~~ > > I fixed it up (I reverted the mm-unstable tree commit) 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. Hey All, what's the proper fix here? Roman, looks like adding mem_cgroup_usage() to include/linux/memcontrol.h wasn't really necessary, since kfuncs don't use it anyway? Should we just remove that line in bpf-next? Just: diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index 6a5d65487b70..229ac9835adb 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h @@ -950,7 +950,6 @@ static inline void mod_memcg_page_state(struct page *page, } unsigned long memcg_events(struct mem_cgroup *memcg, int event); -unsigned long mem_cgroup_usage(struct mem_cgroup *memcg, bool swap); unsigned long memcg_page_state(struct mem_cgroup *memcg, int idx); unsigned long memcg_page_state_output(struct mem_cgroup *memcg, int item); bool memcg_stat_item_valid(int idx); compiles fine. If you agree pls send an official patch. ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: linux-next: manual merge of the bpf-next tree with the mm-unstable tree 2026-01-06 2:15 ` Alexei Starovoitov @ 2026-01-06 2:44 ` Chen Ridong 2026-01-06 4:23 ` Roman Gushchin 1 sibling, 0 replies; 5+ messages in thread From: Chen Ridong @ 2026-01-06 2:44 UTC (permalink / raw) To: Alexei Starovoitov, Stephen Rothwell Cc: Daniel Borkmann, Alexei Starovoitov, Andrii Nakryiko, Andrew Morton, bpf, Networking, Chen Ridong, JP Kobryn, Linux Kernel Mailing List, Linux Next Mailing List, Roman Gushchin On 2026/1/6 10:15, Alexei Starovoitov wrote: > On Sun, Jan 4, 2026 at 6:04 PM Stephen Rothwell <sfr@canb.auug.org.au> wrote: >> >> Hi all, >> >> Today's linux-next merge of the bpf-next tree got a semantic conflict in: >> >> include/linux/memcontrol.h >> mm/memcontrol-v1.c >> mm/memcontrol.c >> >> between commit: >> >> eb557e10dcac ("memcg: move mem_cgroup_usage memcontrol-v1.c") >> >> from the mm-unstable tree and commit: >> >> 99430ab8b804 ("mm: introduce BPF kfuncs to access memcg statistics and events") >> >> from the bpf-next tree producing this build failure: >> >> mm/memcontrol-v1.c:430:22: error: static declaration of 'mem_cgroup_usage' follows non-static declaration >> 430 | static unsigned long mem_cgroup_usage(struct mem_cgroup *memcg, bool swap) >> | ^~~~~~~~~~~~~~~~ >> In file included from mm/memcontrol-v1.c:3: >> include/linux/memcontrol.h:953:15: note: previous declaration of 'mem_cgroup_usage' with type 'long unsigned int(struct mem_cgroup *, bool)' {aka 'long unsigned int(struct mem_cgroup *, _Bool)'} >> 953 | unsigned long mem_cgroup_usage(struct mem_cgroup *memcg, bool swap); >> | ^~~~~~~~~~~~~~~~ >> >> I fixed it up (I reverted the mm-unstable tree commit) 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. > > Hey All, > > what's the proper fix here? > > Roman, > > looks like adding mem_cgroup_usage() to include/linux/memcontrol.h > wasn't really necessary, since kfuncs don't use it anyway? > Should we just remove that line in bpf-next? > I agree, mem_cgroup_usage() is not declared in next. I'm wondering why there is a difference between next and bpf-next. > Just: > diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h > index 6a5d65487b70..229ac9835adb 100644 > --- a/include/linux/memcontrol.h > +++ b/include/linux/memcontrol.h > @@ -950,7 +950,6 @@ static inline void mod_memcg_page_state(struct page *page, > } > > unsigned long memcg_events(struct mem_cgroup *memcg, int event); > -unsigned long mem_cgroup_usage(struct mem_cgroup *memcg, bool swap); > unsigned long memcg_page_state(struct mem_cgroup *memcg, int idx); > unsigned long memcg_page_state_output(struct mem_cgroup *memcg, int item); > bool memcg_stat_item_valid(int idx); > > compiles fine. > > If you agree pls send an official patch. > -- Best regards, Ridong ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: linux-next: manual merge of the bpf-next tree with the mm-unstable tree 2026-01-06 2:15 ` Alexei Starovoitov 2026-01-06 2:44 ` Chen Ridong @ 2026-01-06 4:23 ` Roman Gushchin 2026-01-06 21:40 ` Stephen Rothwell 1 sibling, 1 reply; 5+ messages in thread From: Roman Gushchin @ 2026-01-06 4:23 UTC (permalink / raw) To: Alexei Starovoitov Cc: Stephen Rothwell, Daniel Borkmann, Alexei Starovoitov, Andrii Nakryiko, Andrew Morton, bpf, Networking, Chen Ridong, JP Kobryn, Linux Kernel Mailing List, Linux Next Mailing List Alexei Starovoitov <alexei.starovoitov@gmail.com> writes: > On Sun, Jan 4, 2026 at 6:04 PM Stephen Rothwell <sfr@canb.auug.org.au> wrote: >> >> Hi all, >> >> Today's linux-next merge of the bpf-next tree got a semantic conflict in: >> >> include/linux/memcontrol.h >> mm/memcontrol-v1.c >> mm/memcontrol.c >> >> between commit: >> >> eb557e10dcac ("memcg: move mem_cgroup_usage memcontrol-v1.c") >> >> from the mm-unstable tree and commit: >> >> 99430ab8b804 ("mm: introduce BPF kfuncs to access memcg statistics and events") >> >> from the bpf-next tree producing this build failure: >> >> mm/memcontrol-v1.c:430:22: error: static declaration of 'mem_cgroup_usage' follows non-static declaration >> 430 | static unsigned long mem_cgroup_usage(struct mem_cgroup *memcg, bool swap) >> | ^~~~~~~~~~~~~~~~ >> In file included from mm/memcontrol-v1.c:3: >> include/linux/memcontrol.h:953:15: note: previous declaration of >> 'mem_cgroup_usage' with type 'long unsigned int(struct mem_cgroup *, >> bool)' {aka 'long unsigned int(struct mem_cgroup *, _Bool)'} >> 953 | unsigned long mem_cgroup_usage(struct mem_cgroup *memcg, bool swap); >> | ^~~~~~~~~~~~~~~~ >> >> I fixed it up (I reverted the mm-unstable tree commit) 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. > > Hey All, > > what's the proper fix here? > > Roman, > > looks like adding mem_cgroup_usage() to include/linux/memcontrol.h > wasn't really necessary, since kfuncs don't use it anyway? > Should we just remove that line in bpf-next? Yep. It was used in the previous version, but not in the latest one. Just sent an official fix. Thanks! ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: linux-next: manual merge of the bpf-next tree with the mm-unstable tree 2026-01-06 4:23 ` Roman Gushchin @ 2026-01-06 21:40 ` Stephen Rothwell 0 siblings, 0 replies; 5+ messages in thread From: Stephen Rothwell @ 2026-01-06 21:40 UTC (permalink / raw) To: Roman Gushchin Cc: Alexei Starovoitov, Daniel Borkmann, Alexei Starovoitov, Andrii Nakryiko, Andrew Morton, bpf, Networking, Chen Ridong, JP Kobryn, Linux Kernel Mailing List, Linux Next Mailing List [-- Attachment #1: Type: text/plain, Size: 2335 bytes --] Hi all, On Mon, 05 Jan 2026 20:23:36 -0800 Roman Gushchin <roman.gushchin@linux.dev> wrote: > > Alexei Starovoitov <alexei.starovoitov@gmail.com> writes: > > > On Sun, Jan 4, 2026 at 6:04 PM Stephen Rothwell <sfr@canb.auug.org.au> wrote: > >> > >> Today's linux-next merge of the bpf-next tree got a semantic conflict in: > >> > >> include/linux/memcontrol.h > >> mm/memcontrol-v1.c > >> mm/memcontrol.c > >> > >> between commit: > >> > >> eb557e10dcac ("memcg: move mem_cgroup_usage memcontrol-v1.c") > >> > >> from the mm-unstable tree and commit: > >> > >> 99430ab8b804 ("mm: introduce BPF kfuncs to access memcg statistics and events") > >> > >> from the bpf-next tree producing this build failure: > >> > >> mm/memcontrol-v1.c:430:22: error: static declaration of 'mem_cgroup_usage' follows non-static declaration > >> 430 | static unsigned long mem_cgroup_usage(struct mem_cgroup *memcg, bool swap) > >> | ^~~~~~~~~~~~~~~~ > >> In file included from mm/memcontrol-v1.c:3: > >> include/linux/memcontrol.h:953:15: note: previous declaration of > >> 'mem_cgroup_usage' with type 'long unsigned int(struct mem_cgroup *, > >> bool)' {aka 'long unsigned int(struct mem_cgroup *, _Bool)'} > >> 953 | unsigned long mem_cgroup_usage(struct mem_cgroup *memcg, bool swap); > >> | ^~~~~~~~~~~~~~~~ > >> > >> I fixed it up (I reverted the mm-unstable tree commit) 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. > > > > what's the proper fix here? > > > > Roman, > > > > looks like adding mem_cgroup_usage() to include/linux/memcontrol.h > > wasn't really necessary, since kfuncs don't use it anyway? > > Should we just remove that line in bpf-next? > > Yep. It was used in the previous version, but not in the latest one. > > Just sent an official fix. And with that now applied to the bpf-next tree, I will no longer revert the mm-unstable commit. Thanks. -- Cheers, Stephen Rothwell [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 488 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-01-06 21:40 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-01-05 2:04 linux-next: manual merge of the bpf-next tree with the mm-unstable tree Stephen Rothwell 2026-01-06 2:15 ` Alexei Starovoitov 2026-01-06 2:44 ` Chen Ridong 2026-01-06 4:23 ` Roman Gushchin 2026-01-06 21:40 ` Stephen Rothwell
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox