linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Weiner <hannes@cmpxchg.org>
To: Michal Hocko <mhocko@suse.com>
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 12:31:33 -0400	[thread overview]
Message-ID: <20201026163133.GB548555@cmpxchg.org> (raw)
In-Reply-To: <20201026144757.GJ20500@dhcp22.suse.cz>

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().

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


  reply	other threads:[~2020-10-26 16:33 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 [this message]
2020-10-26 18:43     ` Michal Hocko

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=20201026163133.GB548555@cmpxchg.org \
    --to=hannes@cmpxchg.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --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