[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.21.2001170132090.20618@chino.kir.corp.google.com>
Date: Fri, 17 Jan 2020 01:32:58 -0800 (PST)
From: David Rientjes <rientjes@...gle.com>
To: Kirill Tkhai <ktkhai@...tuozzo.com>
cc: Michal Hocko <mhocko@...nel.org>,
Wei Yang <richardw.yang@...ux.intel.com>, hannes@...xchg.org,
vdavydov.dev@...il.com, akpm@...ux-foundation.org,
kirill.shutemov@...ux.intel.com, yang.shi@...ux.alibaba.com,
cgroups@...r.kernel.org, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, alexander.duyck@...il.com,
stable@...r.kernel.org
Subject: Re: [Patch v3] mm: thp: grab the lock before manipulation defer
list
On Fri, 17 Jan 2020, Kirill Tkhai wrote:
> >> I think that's a good point, especially considering that the current code
> >> appears to unconditionally place any compound page on the deferred split
> >> queue of the destination memcg. The correct list that it should appear
> >> on, I believe, depends on whether the pmd has been split for the process
> >> being moved: note the MC_TARGET_PAGE caveat in
> >> mem_cgroup_move_charge_pte_range() that does not move the charge for
> >> compound pages with split pmds. So when mem_cgroup_move_account() is
> >> called with compound == true, we're moving the charge of the entire
> >> compound page: why would it appear on that memcg's deferred split queue?
> >
> > I believe Kirill asked how do we know that the page should be actually
> > added to the deferred list just from the list_empty check. In other
> > words what if the page hasn't been split at all?
>
> Yes, I'm talking about this. Function mem_cgroup_move_account() adds every
> huge page to the deferred list, while we need to do that only for pages,
> which are queued for splitting...
>
Yup, and that appears broken before Wei's patch. Since we only migrate
charges of entire compound pages (we have a mapping pmd, the underlying
page cannot be split), it should not appear on the deferred split queue
for any memcg, right?
Powered by blists - more mailing lists