Message ID | 20201204202005.3fb1304f@canb.auug.org.au (mailing list archive) |
---|---|
State | Awaiting Upstream |
Delegated to: | BPF |
Headers | show |
Series | linux-next: manual merge of the akpm-current tree with the bpf-next tree | expand |
Context | Check | Description |
---|---|---|
netdev/tree_selection | success | Not a local patch |
Hi all, On Fri, 4 Dec 2020 20:20:05 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote: > > Today's linux-next merge of the akpm-current tree got conflicts in: > > include/linux/memcontrol.h > mm/memcontrol.c > > between commit: > > bcfe06bf2622 ("mm: memcontrol: Use helpers to read page's memcg data") > > from the bpf-next tree and commits: > > 6771a349b8c3 ("mm/memcg: remove incorrect comment") > c3970fcb1f21 ("mm: move lruvec stats update functions to vmstat.h") > > from the akpm-current tree. > > I fixed it up (see below - I used the latter version of memcontrol.h) > 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. > > I also added this merge fix patch: > > From: Stephen Rothwell <sfr@canb.auug.org.au> > Date: Fri, 4 Dec 2020 19:53:40 +1100 > Subject: [PATCH] fixup for "mm: move lruvec stats update functions to vmstat.h" > > conflict against "mm: memcontrol: Use helpers to read page's memcg data" > > Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> > --- > mm/memcontrol.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/mm/memcontrol.c b/mm/memcontrol.c > index 6f5733779927..3b6db4e906b5 100644 > --- a/mm/memcontrol.c > +++ b/mm/memcontrol.c > @@ -851,16 +851,17 @@ void __mod_lruvec_page_state(struct page *page, enum node_stat_item idx, > int val) > { > struct page *head = compound_head(page); /* rmap on tail pages */ > + struct mem_cgroup *memcg = page_memcg(head); > pg_data_t *pgdat = page_pgdat(page); > struct lruvec *lruvec; > > /* Untracked pages have no memcg, no lruvec. Update only the node */ > - if (!head->mem_cgroup) { > + if (!memcg) { > __mod_node_page_state(pgdat, idx, val); > return; > } > > - lruvec = mem_cgroup_lruvec(head->mem_cgroup, pgdat); > + lruvec = mem_cgroup_lruvec(memcg, pgdat); > __mod_lruvec_state(lruvec, idx, val); > } > > -- > 2.29.2 > > -- > Cheers, > Stephen Rothwell > > diff --cc include/linux/memcontrol.h > index 320369c841f5,ff02f831e7e1..000000000000 > --- a/include/linux/memcontrol.h > +++ b/include/linux/memcontrol.h > diff --cc mm/memcontrol.c > index 7535042ac1ec,c9a5dce4343d..000000000000 > --- a/mm/memcontrol.c > +++ b/mm/memcontrol.c > @@@ -2880,9 -2984,9 +2975,9 @@@ static void cancel_charge(struct mem_cg > > static void commit_charge(struct page *page, struct mem_cgroup *memcg) > { > - VM_BUG_ON_PAGE(page->mem_cgroup, page); > + VM_BUG_ON_PAGE(page_memcg(page), page); > /* > - * Any of the following ensures page->mem_cgroup stability: > + * Any of the following ensures page's memcg stability: > * > * - the page lock > * - LRU isolation > @@@ -6977,11 -7012,10 +6997,10 @@@ void mem_cgroup_migrate(struct page *ol > return; > > /* Page cache replacement: new page already charged? */ > - if (newpage->mem_cgroup) > + if (page_memcg(newpage)) > return; > > - /* Swapcache readahead pages can get replaced before being charged */ > - memcg = oldpage->mem_cgroup; > + memcg = page_memcg(oldpage); > if (!memcg) > return; > Just a reminder that this conflict still exists. Commit bcfe06bf2622 is now in the net-next tree.
On Tue, Dec 15, 2020 at 07:21:56AM +1100, Stephen Rothwell wrote: > Hi all, > > On Fri, 4 Dec 2020 20:20:05 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote: > > > > Today's linux-next merge of the akpm-current tree got conflicts in: > > > > include/linux/memcontrol.h > > mm/memcontrol.c > > > > between commit: > > > > bcfe06bf2622 ("mm: memcontrol: Use helpers to read page's memcg data") > > > > from the bpf-next tree and commits: > > > > 6771a349b8c3 ("mm/memcg: remove incorrect comment") > > c3970fcb1f21 ("mm: move lruvec stats update functions to vmstat.h") > > > > from the akpm-current tree. > > > > I fixed it up (see below - I used the latter version of memcontrol.h) > > 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. > > > > I also added this merge fix patch: > > > > From: Stephen Rothwell <sfr@canb.auug.org.au> > > Date: Fri, 4 Dec 2020 19:53:40 +1100 > > Subject: [PATCH] fixup for "mm: move lruvec stats update functions to vmstat.h" > > > > conflict against "mm: memcontrol: Use helpers to read page's memcg data" > > > > Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> > > --- > > mm/memcontrol.c | 5 +++-- > > 1 file changed, 3 insertions(+), 2 deletions(-) > > > > diff --git a/mm/memcontrol.c b/mm/memcontrol.c > > index 6f5733779927..3b6db4e906b5 100644 > > --- a/mm/memcontrol.c > > +++ b/mm/memcontrol.c > > @@ -851,16 +851,17 @@ void __mod_lruvec_page_state(struct page *page, enum node_stat_item idx, > > int val) > > { > > struct page *head = compound_head(page); /* rmap on tail pages */ > > + struct mem_cgroup *memcg = page_memcg(head); > > pg_data_t *pgdat = page_pgdat(page); > > struct lruvec *lruvec; > > > > /* Untracked pages have no memcg, no lruvec. Update only the node */ > > - if (!head->mem_cgroup) { > > + if (!memcg) { > > __mod_node_page_state(pgdat, idx, val); > > return; > > } > > > > - lruvec = mem_cgroup_lruvec(head->mem_cgroup, pgdat); > > + lruvec = mem_cgroup_lruvec(memcg, pgdat); > > __mod_lruvec_state(lruvec, idx, val); > > } > > > > -- > > 2.29.2 > > > > -- > > Cheers, > > Stephen Rothwell > > > > diff --cc include/linux/memcontrol.h > > index 320369c841f5,ff02f831e7e1..000000000000 > > --- a/include/linux/memcontrol.h > > +++ b/include/linux/memcontrol.h > > diff --cc mm/memcontrol.c > > index 7535042ac1ec,c9a5dce4343d..000000000000 > > --- a/mm/memcontrol.c > > +++ b/mm/memcontrol.c > > @@@ -2880,9 -2984,9 +2975,9 @@@ static void cancel_charge(struct mem_cg > > > > static void commit_charge(struct page *page, struct mem_cgroup *memcg) > > { > > - VM_BUG_ON_PAGE(page->mem_cgroup, page); > > + VM_BUG_ON_PAGE(page_memcg(page), page); > > /* > > - * Any of the following ensures page->mem_cgroup stability: > > + * Any of the following ensures page's memcg stability: > > * > > * - the page lock > > * - LRU isolation > > @@@ -6977,11 -7012,10 +6997,10 @@@ void mem_cgroup_migrate(struct page *ol > > return; > > > > /* Page cache replacement: new page already charged? */ > > - if (newpage->mem_cgroup) > > + if (page_memcg(newpage)) > > return; > > > > - /* Swapcache readahead pages can get replaced before being charged */ > > - memcg = oldpage->mem_cgroup; > > + memcg = page_memcg(oldpage); > > if (!memcg) > > return; > > > > Just a reminder that this conflict still exists. Commit bcfe06bf2622 > is now in the net-next tree. Thanks, Stephen! I wonder if it's better to update these 2 commits in the mm tree to avoid conflicts? Basically split your fix into two and merge it into mm commits. The last chunk in the patch should be merged into "mm/memcg: remove incorrect comment". And the rest into "mm: move lruvec stats update functions to vmstat.h". Andrew, what do you think? Thanks!
On Mon, 14 Dec 2020 17:29:43 -0800 Roman Gushchin <guro@fb.com> wrote: > On Tue, Dec 15, 2020 at 07:21:56AM +1100, Stephen Rothwell wrote: > > Hi all, > > > > On Fri, 4 Dec 2020 20:20:05 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote: > > > > > > Today's linux-next merge of the akpm-current tree got conflicts in: > > > > > > include/linux/memcontrol.h > > > mm/memcontrol.c > > > > > > between commit: > > > > > > bcfe06bf2622 ("mm: memcontrol: Use helpers to read page's memcg data") > > > > > > from the bpf-next tree and commits: > > > > > > 6771a349b8c3 ("mm/memcg: remove incorrect comment") > > > c3970fcb1f21 ("mm: move lruvec stats update functions to vmstat.h") > > > > > > from the akpm-current tree. > > > > ... > > > > Just a reminder that this conflict still exists. Commit bcfe06bf2622 > > is now in the net-next tree. > > Thanks, Stephen! > > I wonder if it's better to update these 2 commits in the mm tree to avoid > conflicts? > > Basically split your fix into two and merge it into mm commits. > The last chunk in the patch should be merged into "mm/memcg: remove incorrect comment". > And the rest into "mm: move lruvec stats update functions to vmstat.h". > > Andrew, what do you think? I have "mm/memcg: remove incorrect comment" and "mm: move lruvec stats update functions to vmstat.h" staged against Linus's tree and plan to send them to him later today. So I trust the BPF tree maintainers will be able to resolve these minor things when those patches turn up in mainline.
On Mon, 14 Dec 2020 17:40:21 -0800 Andrew Morton wrote: > On Mon, 14 Dec 2020 17:29:43 -0800 Roman Gushchin <guro@fb.com> wrote: > > On Tue, Dec 15, 2020 at 07:21:56AM +1100, Stephen Rothwell wrote: > > > On Fri, 4 Dec 2020 20:20:05 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote: > > > > Today's linux-next merge of the akpm-current tree got conflicts in: > > > > > > > > include/linux/memcontrol.h > > > > mm/memcontrol.c > > > > > > > > between commit: > > > > > > > > bcfe06bf2622 ("mm: memcontrol: Use helpers to read page's memcg data") > > > > > > > > from the bpf-next tree and commits: > > > > > > > > 6771a349b8c3 ("mm/memcg: remove incorrect comment") > > > > c3970fcb1f21 ("mm: move lruvec stats update functions to vmstat.h") > > > > > > > > from the akpm-current tree. > > > > > > ... > > > > > > Just a reminder that this conflict still exists. Commit bcfe06bf2622 > > > is now in the net-next tree. > > > > Thanks, Stephen! > > > > I wonder if it's better to update these 2 commits in the mm tree to avoid > > conflicts? > > > > Basically split your fix into two and merge it into mm commits. > > The last chunk in the patch should be merged into "mm/memcg: remove incorrect comment". > > And the rest into "mm: move lruvec stats update functions to vmstat.h". > > > > Andrew, what do you think? > > I have "mm/memcg: remove incorrect comment" and "mm: move lruvec stats > update functions to vmstat.h" staged against Linus's tree and plan to > send them to him later today. So I trust the BPF tree maintainers will > be able to resolve these minor things when those patches turn up in > mainline. Hm. The code is in net-next by now. I was thinking of sending the Networking PR later today (tonight?) as well. I'm happy to hold off or do whatever you require, but I'd appreciate more explicit / noob friendly instructions. AFAIU all we can do is tell Linus about the merge issue, and point at Stephen's resolution.
On Mon, 14 Dec 2020 18:06:29 -0800 Jakub Kicinski <kuba@kernel.org> wrote: > On Mon, 14 Dec 2020 17:40:21 -0800 Andrew Morton wrote: > > On Mon, 14 Dec 2020 17:29:43 -0800 Roman Gushchin <guro@fb.com> wrote: > > > On Tue, Dec 15, 2020 at 07:21:56AM +1100, Stephen Rothwell wrote: > > > > On Fri, 4 Dec 2020 20:20:05 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote: > > > > > Today's linux-next merge of the akpm-current tree got conflicts in: > > > > > > > > > > include/linux/memcontrol.h > > > > > mm/memcontrol.c > > > > > > > > > > between commit: > > > > > > > > > > bcfe06bf2622 ("mm: memcontrol: Use helpers to read page's memcg data") > > > > > > > > > > from the bpf-next tree and commits: > > > > > > > > > > 6771a349b8c3 ("mm/memcg: remove incorrect comment") > > > > > c3970fcb1f21 ("mm: move lruvec stats update functions to vmstat.h") > > > > > > > > > > from the akpm-current tree. > > > > > > > > ... > > > > > > > > Just a reminder that this conflict still exists. Commit bcfe06bf2622 > > > > is now in the net-next tree. > > > > > > Thanks, Stephen! > > > > > > I wonder if it's better to update these 2 commits in the mm tree to avoid > > > conflicts? > > > > > > Basically split your fix into two and merge it into mm commits. > > > The last chunk in the patch should be merged into "mm/memcg: remove incorrect comment". > > > And the rest into "mm: move lruvec stats update functions to vmstat.h". > > > > > > Andrew, what do you think? > > > > I have "mm/memcg: remove incorrect comment" and "mm: move lruvec stats > > update functions to vmstat.h" staged against Linus's tree and plan to > > send them to him later today. So I trust the BPF tree maintainers will > > be able to resolve these minor things when those patches turn up in > > mainline. > > Hm. The code is in net-next by now. I was thinking of sending the > Networking PR later today (tonight?) as well. I'm happy to hold off > or do whatever you require, but I'd appreciate more explicit / noob > friendly instructions. Linus tends not to like it when tree maintainers do last-minute conflict fixes. > AFAIU all we can do is tell Linus about the merge issue, and point > at Stephen's resolution. That's the way to do it - including a (tested?) copy in the email would be nice.
On Mon, 14 Dec 2020 18:11:21 -0800 Andrew Morton wrote: > On Mon, 14 Dec 2020 18:06:29 -0800 Jakub Kicinski <kuba@kernel.org> wrote: > > Hm. The code is in net-next by now. I was thinking of sending the > > Networking PR later today (tonight?) as well. I'm happy to hold off > > or do whatever you require, but I'd appreciate more explicit / noob > > friendly instructions. > > Linus tends not to like it when tree maintainers do last-minute > conflict fixes. Good to know. > > AFAIU all we can do is tell Linus about the merge issue, and point > > at Stephen's resolution. > > That's the way to do it - including a (tested?) copy in the email would > be nice. Okay, great. Will try this, thanks!
Hi Jakub, On Mon, 14 Dec 2020 18:06:29 -0800 Jakub Kicinski <kuba@kernel.org> wrote: > > AFAIU all we can do is tell Linus about the merge issue, and point > at Stephen's resolution. This is the correct response.
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 6f5733779927..3b6db4e906b5 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -851,16 +851,17 @@ void __mod_lruvec_page_state(struct page *page, enum node_stat_item idx, int val) { struct page *head = compound_head(page); /* rmap on tail pages */ + struct mem_cgroup *memcg = page_memcg(head); pg_data_t *pgdat = page_pgdat(page); struct lruvec *lruvec; /* Untracked pages have no memcg, no lruvec. Update only the node */ - if (!head->mem_cgroup) { + if (!memcg) { __mod_node_page_state(pgdat, idx, val); return; } - lruvec = mem_cgroup_lruvec(head->mem_cgroup, pgdat); + lruvec = mem_cgroup_lruvec(memcg, pgdat); __mod_lruvec_state(lruvec, idx, val); } -- 2.29.2 -- Cheers, Stephen Rothwell diff --cc include/linux/memcontrol.h index 320369c841f5,ff02f831e7e1..000000000000 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h diff --cc mm/memcontrol.c index 7535042ac1ec,c9a5dce4343d..000000000000 --- a/mm/memcontrol.c