lkml.org 
[lkml]   [2021]   [Mar]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] mm: memcontrol: fix memsw uncharge for root_mem_cgroup
On Wed 24-03-21 12:11:35, Muchun Song wrote:
> On Tue, Mar 23, 2021 at 11:04 PM Muchun Song <songmuchun@bytedance.com> wrote:
> >
> > The pages aren't accounted at the root level, so we cannot uncharge the
> > page to the memsw counter for the root memcg. Fix this.
> >
> > Fixes: 1f47b61fb407 ("mm: memcontrol: fix swap counter leak on swapout from offline cgroup")
> > Signed-off-by: Muchun Song <songmuchun@bytedance.com>
>
> I am very sorry. I should repent. I suddenly realise the fix is totally
> wrong. Because the @memcg cannot be root memcg when
> @memcg != @swap_memcg.

I am probably blind but I do not see why this would be the case.
We have memcg != swap_memcg in this branch but we do not know the
neither of the two is root_mem_cgroup, no? If we did knot that we
wouldn't have to check for swap_memcg != root_mem_cgroup. Or do I miss
something?
--
Michal Hocko
SUSE Labs

\
 
 \ /
  Last update: 2021-03-24 09:35    [W:0.586 / U:0.944 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site