linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@suse.com>
To: Qian Cai <cai@lca.pw>
Cc: Alex Shi <alex.shi@linux.alibaba.com>,
	akpm@linux-foundation.org, Johannes Weiner <hannes@cmpxchg.org>,
	Vladimir Davydov <vdavydov.dev@gmail.com>,
	cgroups@vger.kernel.org, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org, nao.horiguchi@gmail.com,
	osalvador@suse.de, mike.kravetz@oracle.com
Subject: Re: [Resend PATCH 1/6] mm/memcg: warning on !memcg after readahead page charged
Date: Mon, 24 Aug 2020 17:10:13 +0200	[thread overview]
Message-ID: <20200824151013.GB3415@dhcp22.suse.cz> (raw)
In-Reply-To: <20200821134842.GF32537@dhcp22.suse.cz>

On Fri 21-08-20 15:48:44, Michal Hocko wrote:
> On Fri 21-08-20 08:39:37, Qian Cai wrote:
> > On Fri, Aug 21, 2020 at 10:01:27AM +0200, Michal Hocko wrote:
> > > On Thu 20-08-20 10:58:51, Qian Cai wrote:
> > > > On Tue, Aug 11, 2020 at 07:10:27PM +0800, Alex Shi wrote:
> > > > > Since readahead page is charged on memcg too, in theory we don't have to
> > > > > check this exception now. Before safely remove them all, add a warning
> > > > > for the unexpected !memcg.
> > > > > 
> > > > > Signed-off-by: Alex Shi <alex.shi@linux.alibaba.com>
> > > > > Acked-by: Michal Hocko <mhocko@suse.com>
> > > > 
> > > > This will trigger,
> > > 
> > > Thanks for the report!
> > >  
> > > > [ 1863.916499] LTP: starting move_pages12
> > > > [ 1863.946520] page:000000008ccc1062 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1fd3c0
> > > > [ 1863.946553] head:000000008ccc1062 order:5 compound_mapcount:0 compound_pincount:0
> > > 
> > > Hmm, this is really unexpected. How did we get order-5 page here? Is
> > > this some special mappaing that sys_move_pages should just ignore?
> > 
> > Well, I thought everybody should be able to figure out where to find the LTP
> > tests source code at this stage to see what it does. Anyway, the test simply
> > migrate hugepages while soft offlining, so order 5 is expected as that is 2M
> > hugepage on powerpc (also reproduced on x86 below). It might be easier to
> > reproduce using our linux-mm random bug collection on NUMA systems.
> 
> OK, I must have missed that this was on ppc. The order makes more sense
> now. I will have a look at this next week.

OK, so I've had a look and I know what's going on there. The
move_pages12 is migrating hugetlb pages. Those are not charged to any
memcg. We have completely missed this case. There are two ways going
around that. Drop the warning and update the comment so that we do not
forget about that or special case hugetlb pages.

I think the first option is better.
-- 
Michal Hocko
SUSE Labs


  reply	other threads:[~2020-08-24 15:10 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-11 11:10 Alex Shi
2020-08-11 11:10 ` [Resend PATCH 2/6] mm/memcg: remove useless check on page->mem_cgroup Alex Shi
2020-08-11 11:30   ` Michal Hocko
2020-08-11 12:42     ` Alex Shi
2020-08-11 12:54     ` Alex Shi
2020-08-11 13:56       ` Michal Hocko
2020-08-12  3:25         ` Alex Shi
2020-08-13  6:20           ` Michal Hocko
2020-08-13  9:45             ` Alex Shi
2020-08-13 11:01               ` Michal Hocko
2020-08-11 11:10 ` [Resend PATCH 3/6] mm/thp: move lru_add_page_tail func to huge_memory.c Alex Shi
2020-08-11 11:10 ` [Resend PATCH 4/6] mm/thp: clean up lru_add_page_tail Alex Shi
2020-08-11 11:10 ` [Resend PATCH 5/6] mm/thp: remove code path which never got into Alex Shi
2020-08-11 11:10 ` [Resend PATCH 6/6] mm/thp: narrow lru locking Alex Shi
2020-08-20 14:58 ` [Resend PATCH 1/6] mm/memcg: warning on !memcg after readahead page charged Qian Cai
2020-08-21  8:01   ` Michal Hocko
2020-08-21 12:39     ` Qian Cai
2020-08-21 13:48       ` Michal Hocko
2020-08-24 15:10         ` Michal Hocko [this message]
2020-08-25  1:25           ` Alex Shi
2020-08-25  2:04             ` Hugh Dickins
2020-08-27  6:00               ` Hugh Dickins
2020-08-25  7:25             ` Michal Hocko
2020-08-24 14:52   ` Qian Cai
2020-08-24 15:10     ` Michal Hocko
2020-08-24 23:00       ` Stephen Rothwell
2020-08-24 23:14         ` Alex Shi

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=20200824151013.GB3415@dhcp22.suse.cz \
    --to=mhocko@suse.com \
    --cc=akpm@linux-foundation.org \
    --cc=alex.shi@linux.alibaba.com \
    --cc=cai@lca.pw \
    --cc=cgroups@vger.kernel.org \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mike.kravetz@oracle.com \
    --cc=nao.horiguchi@gmail.com \
    --cc=osalvador@suse.de \
    --cc=vdavydov.dev@gmail.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox