linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Cai Xinchen <caixinchen1@huawei.com>
To: <mkoutny@suse.com>
Cc: <songmuchun@bytedance.com>, <akpm@linux-foundation.org>,
	<hannes@cmpxchg.org>, <longman@redhat.com>, <mhocko@kernel.org>,
	<roman.gushchin@linux.dev>, <shakeelb@google.com>,
	<cgroups@vger.kernel.org>, <duanxiongchun@bytedance.com>,
	<linux-kernel@vger.kernel.org>, <linux-mm@kvack.org>,
	<yosryahmed@google.com>, <mpenttil@redhat.com>
Subject: Re: [PATCH 1/1] mm: memcontrol: fix vmstats_percpu state incorrect subtraction after reparent
Date: Mon, 27 Mar 2023 09:29:37 +0800	[thread overview]
Message-ID: <f183b995-9ed1-db80-5f0a-493e77946886@huawei.com> (raw)
In-Reply-To: <20230324171114.32oru5sdubfsfvgi@blackpad>

Yes, only cgroup v1.

On 2023/3/25 1:11, Michal Koutný wrote:
> Hello.
>
> On Mon, Mar 20, 2023 at 03:06:48AM +0000, Cai Xinchen <caixinchen1@huawei.com> wrote:
>> When memcg C is offllined, its pages are reparented to memcg P,
>> so far P->vmstats (hierarchical) have those pages, and
>> P->vmstats_percpu (non-hierarchical) don't. When those pages get
>> uncharged, P->vmstats (hierachical) decreases, which is correct,
>> but P->vmstats_percpu (non-hierarchical) also decreases, which
>> is wrong, as those stats were never added to P->vmstats_percpu to
>> begin with.
> I was wondering why ->vmstats_percpu matters (in the end all is summed
> in ->vmstats) -- do you mean this is a cgroup v1 only issue? As only
> that exposes the non-hieararchical stats.
>
> Thanks,
> Michal


  reply	other threads:[~2023-03-27  1:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-20  3:06 [PATCH 0/1] Fix vmstat_percpu " Cai Xinchen
2023-03-20  3:06 ` [PATCH 1/1] mm: memcontrol: fix vmstats_percpu state " Cai Xinchen
2023-03-24 17:11   ` Michal Koutný
2023-03-27  1:29     ` Cai Xinchen [this message]
2023-03-24 17:14 ` [PATCH 0/1] Fix vmstat_percpu " Michal Koutný

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=f183b995-9ed1-db80-5f0a-493e77946886@huawei.com \
    --to=caixinchen1@huawei.com \
    --cc=akpm@linux-foundation.org \
    --cc=cgroups@vger.kernel.org \
    --cc=duanxiongchun@bytedance.com \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=longman@redhat.com \
    --cc=mhocko@kernel.org \
    --cc=mkoutny@suse.com \
    --cc=mpenttil@redhat.com \
    --cc=roman.gushchin@linux.dev \
    --cc=shakeelb@google.com \
    --cc=songmuchun@bytedance.com \
    --cc=yosryahmed@google.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