linux-next: manual merge of the akpm-current tree with the bpf-next tree
Subsystems (5)
Hi all,
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 <[email protected]>
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"
--- mm/memcontrol.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
mm/memcontrol.c +3 -2
@@ -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); }
Signature · 39 lines
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;Hi all,
Quoted 92 lines · On Fri, 4 Dec 2020 20:20:05 +1100 Stephen Rothwell <[email protected]> wrote:
Today's linux-next merge of the akpm-current tree got conflicts in:
include/linux/memcontrol.h
mm/memcontrol.cbetween 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 tovmstat.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 <[email protected]>
Date: Fri, 4 Dec 2020 19:53:40 +1100
Subject: [PATCH] fixup for "mm: move lruvec stats update functions tovmstat.h"conflict against "mm: memcontrol: Use helpers to read page's memcg data"
Signed-off-by Stephen Rothwell <[email protected]>--- mm/memcontrol.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)mm/memcontrol.c +3
-2@@ -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); }Signature · 5 lines
2.29.2 -- Cheers, Stephen Rothwellinclude/linux/memcontrol.h +0
-0mm/memcontrol.c +1
-1@@@ -2880,9 -2984,9 +2975,9 @@@ static void cancel_charge(struct mem_cgstatic 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 *olreturn ;
mm/memcontrol.c
Quoted 10 lines
mm/memcontrol.c +0
-1/* 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.
Signature · 2 lines
Cheers, Stephen Rothwell
Quoted 99 lines · Stephen Rothwell
Hi all,
Quoted 96 lines · On Fri, 4 Dec 2020 20:20:05 +1100 Stephen Rothwell <[email protected]> wrote:
Today's linux-next merge of the akpm-current tree got conflicts in:
include/linux/memcontrol.h
mm/memcontrol.cbetween 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 tovmstat.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 <[email protected]>
Date: Fri, 4 Dec 2020 19:53:40 +1100
Subject: [PATCH] fixup for "mm: move lruvec stats update functions tovmstat.h"conflict against "mm: memcontrol: Use helpers to read page's memcg data"
Signed-off-by Stephen Rothwell <[email protected]>--- mm/memcontrol.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)mm/memcontrol.c +3
-2@@ -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); }Signature · 5 lines
2.29.2 -- Cheers, Stephen Rothwellinclude/linux/memcontrol.h +0
-0mm/memcontrol.c +1
-1@@@ -2880,9 -2984,9 +2975,9 @@@ static void cancel_charge(struct mem_cgstatic 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 *olreturn ;/* Page cache replacement: new page already charged? */ - if (newpage->mem_cgroup) + if (page_memcg(newpage)) return;
Quoted 9 lines
mm/memcontrol.c
Quoted 6 lines
mm/memcontrol.c +0
-1-/* 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
bcfe06bf2622is 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!
Andrew Morton
maintainerQuoted 28 lines · On Mon, 14 Dec 2020 17:29:43 -0800 Roman Gushchin <[email protected]> wrote:
Quoted 20 lines · Stephen Rothwell
Hi all,
Quoted 17 lines · On Fri, 4 Dec 2020 20:20:05 +1100 Stephen Rothwell <[email protected]> wrote:
Today's linux-next merge of the akpm-current tree got conflicts in:
include/linux/memcontrol.h
mm/memcontrol.cbetween 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 tovmstat.h")from the akpm-current tree.
...
Quoted 3 lines
Just a reminder that this conflict still exists. Commit
bcfe06bf2622is now in the net-next tree.Thanks, Stephen!
Quoted 8 lines
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 tovmstat.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.
Jakub Kicinski
maintainerQuoted 33 lines · On Mon, 14 Dec 2020 17:40:21 -0800 Andrew Morton wrote:
Quoted 32 lines · On Mon, 14 Dec 2020 17:29:43 -0800 Roman Gushchin <[email protected]> wrote:
Quoted 17 lines · Stephen Rothwell
Quoted 16 lines · On Fri, 4 Dec 2020 20:20:05 +1100 Stephen Rothwell <[email protected]> wrote:
Today's linux-next merge of the akpm-current tree got conflicts in:
include/linux/memcontrol.h
mm/memcontrol.cbetween 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 tovmstat.h")from the akpm-current tree.
...
Quoted 3 lines
Just a reminder that this conflict still exists. Commit
bcfe06bf2622is 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 tovmstat.h".
Quoted 7 lines
Quoted 1 line
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.
Andrew Morton
maintainerQuoted 42 lines · On Mon, 14 Dec 2020 18:06:29 -0800 Jakub Kicinski <[email protected]> wrote:
Quoted 33 lines · On Mon, 14 Dec 2020 17:40:21 -0800 Andrew Morton wrote:
Quoted 32 lines · On Mon, 14 Dec 2020 17:29:43 -0800 Roman Gushchin <[email protected]> wrote:
Quoted 17 lines · Stephen Rothwell
Quoted 16 lines · On Fri, 4 Dec 2020 20:20:05 +1100 Stephen Rothwell <[email protected]> wrote:
Today's linux-next merge of the akpm-current tree got conflicts in:
include/linux/memcontrol.h
mm/memcontrol.cbetween 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 tovmstat.h")from the akpm-current tree.
...
Quoted 3 lines
Just a reminder that this conflict still exists. Commit
bcfe06bf2622is 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 tovmstat.h".Quoted 7 lines
Quoted 1 line
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.
Quoted 4 lines
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.
Quoted 2 lines
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.
Jakub Kicinski
maintainerQuoted 8 lines · On Mon, 14 Dec 2020 18:11:21 -0800 Andrew Morton wrote:
Quoted 4 lines · On Mon, 14 Dec 2020 18:06:29 -0800 Jakub Kicinski <[email protected]> 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.
Quoted 5 lines
Quoted 2 lines
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,
Quoted 3 lines · On Mon, 14 Dec 2020 18:06:29 -0800 Jakub Kicinski <[email protected]> wrote:
AFAIU all we can do is tell Linus about the merge issue, and point at Stephen's resolution.
This is the correct response.
Signature · 2 lines
Cheers, Stephen Rothwell