linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Andrew Morton <akpm@linux-foundation.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Alexei Starovoitov <ast@kernel.org>,
	Networking <netdev@vger.kernel.org>
Cc: Alex Shi <alex.shi@linux.alibaba.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Next Mailing List <linux-next@vger.kernel.org>,
	Roman Gushchin <guro@fb.com>, Shakeel Butt <shakeelb@google.com>
Subject: linux-next: manual merge of the akpm-current tree with the bpf-next tree
Date: Fri, 4 Dec 2020 20:20:05 +1100	[thread overview]
Message-ID: <20201204202005.3fb1304f@canb.auug.org.au> (raw)

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

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 <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;
  

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

             reply	other threads:[~2020-12-04  9:21 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-04  9:20 Stephen Rothwell [this message]
2020-12-14 20:21 ` Stephen Rothwell
2020-12-15  1:29   ` Roman Gushchin
2020-12-15  1:40     ` Andrew Morton
2020-12-15  2:06       ` Jakub Kicinski
2020-12-15  2:11         ` Andrew Morton
2020-12-15  2:13           ` Jakub Kicinski
2020-12-15  2:23         ` Stephen Rothwell
  -- strict thread matches above, loose matches on Subject: below --
2020-04-29  6:45 Stephen Rothwell
2020-04-29  6:47 ` Christoph Hellwig
2020-04-29  6:49   ` Alexei Starovoitov
2020-04-29  6:54     ` Christoph Hellwig
2020-04-29  8:24       ` Stephen Rothwell
2020-05-01  4:00         ` Al Viro

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201204202005.3fb1304f@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=akpm@linux-foundation.org \
    --cc=alex.shi@linux.alibaba.com \
    --cc=ast@kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=guro@fb.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=shakeelb@google.com \
    --subject='Re: linux-next: manual merge of the akpm-current tree with the bpf-next tree' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).