All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shakeel Butt <shakeelb@google.com>
To: Muchun Song <songmuchun@bytedance.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	rafael@kernel.org, Alexey Dobriyan <adobriyan@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Johannes Weiner <hannes@cmpxchg.org>,
	Michal Hocko <mhocko@kernel.org>,
	Vladimir Davydov <vdavydov.dev@gmail.com>,
	Hugh Dickins <hughd@google.com>, Roman Gushchin <guro@fb.com>,
	Sami Tolvanen <samitolvanen@google.com>,
	Feng Tang <feng.tang@intel.com>, Neil Brown <neilb@suse.de>,
	Joonsoo Kim <iamjoonsoo.kim@lge.com>,
	Randy Dunlap <rdunlap@infradead.org>,
	LKML <linux-kernel@vger.kernel.org>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	Linux MM <linux-mm@kvack.org>, Cgroups <cgroups@vger.kernel.org>
Subject: Re: [PATCH v5 2/7] mm: memcontrol: convert NR_ANON_THPS account to pages
Date: Wed, 23 Dec 2020 14:08:00 -0800	[thread overview]
Message-ID: <CALvZod7kMhb7k6rDZj18JTE=RMji-SinJmfdcPbN9PUL9Off_w@mail.gmail.com> (raw)
In-Reply-To: <20201217034356.4708-3-songmuchun@bytedance.com>

On Wed, Dec 16, 2020 at 7:45 PM Muchun Song <songmuchun@bytedance.com> wrote:
>
> Currently we use struct per_cpu_nodestat to cache the vmstat
> counters, which leads to inaccurate statistics expecially THP

*especially

> vmstat counters. In the systems with hundreads of processors

*hundreds

> it can be GBs of memory. For example, for a 96 CPUs system,
> the threshold is the maximum number of 125. And the per cpu
> counters can cache 23.4375 GB in total.
>
> The THP page is already a form of batched addition (it will
> add 512 worth of memory in one go) so skipping the batching
> seems like sensible. Although every THP stats update overflows
> the per-cpu counter, resorting to atomic global updates. But
> it can make the statistics more accuracy for the THP vmstat
> counters.
>
> So we convert the NR_ANON_THPS account to pages. This patch
> is consistent with 8f182270dfec ("mm/swap.c: flush lru pvecs
> on compound page arrival"). Doing this also can make the unit
> of vmstat counters more unified. Finally, the unit of the vmstat
> counters are pages, kB and bytes. The B/KB suffix can tell us
> that the unit is bytes or kB. The rest which is without suffix
> are pages.
>
> Signed-off-by: Muchun Song <songmuchun@bytedance.com>

I agree with the motivation behind this patch but I would like to see
some performance numbers in the commit message. We might agree to pay
the price but at least we will know what exactly that cost is.

  reply	other threads:[~2020-12-23 22:08 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-17  3:43 [PATCH v5 0/7] Convert all THP vmstat counters to pages Muchun Song
2020-12-17  3:43 ` [PATCH v5 1/7] mm: memcontrol: fix NR_ANON_THPS accounting in charge moving Muchun Song
2020-12-23 21:01   ` Shakeel Butt
2020-12-23 21:01     ` Shakeel Butt
2020-12-17  3:43 ` [PATCH v5 2/7] mm: memcontrol: convert NR_ANON_THPS account to pages Muchun Song
2020-12-23 22:08   ` Shakeel Butt [this message]
2020-12-23 22:08     ` Shakeel Butt
2020-12-24  2:45     ` [External] " Muchun Song
2020-12-24  2:45       ` Muchun Song
2020-12-24  2:45       ` Muchun Song
2020-12-17  3:43 ` [PATCH v5 3/7] mm: memcontrol: convert NR_FILE_THPS " Muchun Song
2020-12-17  3:43 ` [PATCH v5 4/7] mm: memcontrol: convert NR_SHMEM_THPS " Muchun Song
2020-12-17  3:43   ` Muchun Song
2020-12-17  3:43 ` [PATCH v5 5/7] mm: memcontrol: convert NR_SHMEM_PMDMAPPED " Muchun Song
2020-12-17  3:43 ` [PATCH v5 6/7] mm: memcontrol: convert NR_FILE_PMDMAPPED " Muchun Song
2020-12-17  3:43   ` Muchun Song
2020-12-17  3:43 ` [PATCH v5 7/7] mm: memcontrol: make the slab calculation consistent Muchun Song
2020-12-23 21:21   ` Shakeel Butt
2020-12-23 21:21     ` Shakeel Butt
2020-12-23 21:21     ` Shakeel Butt
2020-12-24  2:43     ` [External] " Muchun Song
2020-12-24  2:43       ` Muchun Song
2020-12-24  2:43       ` Muchun Song

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='CALvZod7kMhb7k6rDZj18JTE=RMji-SinJmfdcPbN9PUL9Off_w@mail.gmail.com' \
    --to=shakeelb@google.com \
    --cc=adobriyan@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=cgroups@vger.kernel.org \
    --cc=feng.tang@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=guro@fb.com \
    --cc=hannes@cmpxchg.org \
    --cc=hughd@google.com \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@kernel.org \
    --cc=neilb@suse.de \
    --cc=rafael@kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=samitolvanen@google.com \
    --cc=songmuchun@bytedance.com \
    --cc=vdavydov.dev@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.