linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@suse.com>
To: Johannes Weiner <hannes@cmpxchg.org>
Cc: zhongjiang-ali <zhongjiang-ali@linux.alibaba.com>,
	vdavydov.dev@gmail.com, akpm@linux-foundation.org,
	linux-mm@kvack.org
Subject: Re: [PATCH] mm: memcontrol: correct the NR_ANON_THPS counter of hierarchical memcg
Date: Mon, 26 Oct 2020 19:43:14 +0100	[thread overview]
Message-ID: <20201026184314.GL20500@dhcp22.suse.cz> (raw)
In-Reply-To: <20201026163133.GB548555@cmpxchg.org>

On Mon 26-10-20 12:31:33, Johannes Weiner wrote:
> On Mon, Oct 26, 2020 at 03:47:57PM +0100, Michal Hocko wrote:
> > On Mon 26-10-20 22:26:35, zhongjiang-ali wrote:
> > > memcg_page_state will get the specified number in hierarchical memcg,
> > > It should multiply by HPAGE_PMD_NR rather than an page if the item is
> > > NR_ANON_THPS.
> > 
> > I am not sure which tree are you looking at but the current Linus tree
> > already does have this hunk.
> 
> This tripped up my pattern matching as well. You go to the code and
> you see this bit already there. But it's only there for the local
> stats, not the hierarchical stats, and the code for them is nearly
> identical - except "%s" vs "total_%s" and memcg_page_state_local() vs
> memcg_page_state().

You are right! Completely missed the total part. Thanks!

My bad!

> Zhongjiang is updating the hierarchical stats a few lines below where
> you see that hunk.

Acked-by: Michal Hocko <mhocko@suse.com>

-- 
Michal Hocko
SUSE Labs


      reply	other threads:[~2020-10-26 18:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-26 14:26 zhongjiang-ali
2020-10-26 14:47 ` Johannes Weiner
2020-10-26 14:47 ` Michal Hocko
2020-10-26 16:31   ` Johannes Weiner
2020-10-26 18:43     ` Michal Hocko [this message]

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=20201026184314.GL20500@dhcp22.suse.cz \
    --to=mhocko@suse.com \
    --cc=akpm@linux-foundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=linux-mm@kvack.org \
    --cc=vdavydov.dev@gmail.com \
    --cc=zhongjiang-ali@linux.alibaba.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