From: Joshua Hahn <joshua.hahnjy@gmail.com>
To: Michal Hocko <mhocko@suse.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>,
nphamcs@gmail.com, shakeel.butt@linux.dev,
roman.gushchin@linux.dev, muchun.song@linux.dev, tj@kernel.org,
lizefan.x@bytedance.com, mkoutny@suse.com, corbet@lwn.net,
lnyng@meta.com, akpm@linux-foundation.org,
cgroups@vger.kernel.org, linux-mm@kvack.org,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-team@meta.com
Subject: Re: [PATCH v3 1/1] memcg/hugetlb: Adding hugeTLB counters to memcg
Date: Thu, 31 Oct 2024 15:03:34 -0400 [thread overview]
Message-ID: <CAN+CAwMioguv6itTSYVUO9__kQVv6HZO2-i0NWt10-x7f6JVSQ@mail.gmail.com> (raw)
In-Reply-To: <ZyM7_i1HFnFfUmIR@tiehlicka>
Hi Michal,
On Thu, Oct 31, 2024 at 4:12 AM Michal Hocko <mhocko@suse.com> wrote:
>
> I would also add the following
>
> The global counter is added because vmstats is the preferred framework
> for cgroup stats. It makes stat items consistent between global and
> cgroup. It provides a per-node breakdown as well which is useful. It
> avoids proliferating cgroup-specific hooks in generic MM code.
>
> Acked-by: Michal Hocko <mhocko@suse.com>
> Thanks!
> --
> Michal Hocko
> SUSE Labs
Thank you for your feedback and review. I think this makes sense,
I will add a new paragraph to the implementation details section!
Andrew -- I am sorry to ask again, but do you think you can replace
the 3rd section in the patch (3. Implementation Details) with the
following paragraphs? Thank you so much!
In the alloc / free hugetlb functions, we call lruvec_stat_mod_folio
regardless of whether memcg accounts hugetlb. mem_cgroup_commit_charge
which is called from alloc_hugetlb_folio will set memcg for the folio
only if the CGRP_ROOT_MEMORY_HUGETLB_ACCOUNTING cgroup mount option is
used, so lruvec_stat_mod_folio accounts per-memcg hugetlb counters
only if the feature is enabled. Regardless of whether memcg accounts
for hugetlb, the newly added global counter is updated and shown
in /proc/vmstat.
The global counter is added because vmstats is the preferred framework
for cgroup stats. It makes stat items consistent between global and
cgroups. It also provides a per-node breakdown, which is useful.
Because it does not use cgroup-specific hooks, we also keep generic
MM code separate from memcg code.
Thank you Johannes & Michal for your continued feedback and interest
in my work, and thank you Andrew for reviewing and allowing me to
fix the patch messages.
I hope you all have a great rest of your day!
Joshua
next prev parent reply other threads:[~2024-10-31 19:03 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-28 21:05 Joshua Hahn
2024-10-28 22:38 ` Shakeel Butt
2024-10-29 20:28 ` Roman Gushchin
2024-10-29 20:48 ` Johannes Weiner
2024-10-29 21:04 ` Nhat Pham
2024-10-30 11:35 ` Michal Hocko
2024-10-30 15:01 ` Johannes Weiner
2024-10-30 15:27 ` Michal Hocko
2024-10-30 18:30 ` Johannes Weiner
2024-10-30 20:43 ` Joshua Hahn
2024-10-30 23:26 ` Andrew Morton
2024-10-31 8:12 ` Michal Hocko
2024-10-31 16:09 ` Johannes Weiner
2024-10-31 19:03 ` Joshua Hahn [this message]
2024-11-01 1:34 ` Andrew Morton
2024-11-01 18:33 ` Joshua Hahn
2024-11-01 20:02 ` Andrew Morton
2024-11-01 20:28 ` Joshua Hahn
2024-10-30 14:52 ` Chris Down
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=CAN+CAwMioguv6itTSYVUO9__kQVv6HZO2-i0NWt10-x7f6JVSQ@mail.gmail.com \
--to=joshua.hahnjy@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=cgroups@vger.kernel.org \
--cc=corbet@lwn.net \
--cc=hannes@cmpxchg.org \
--cc=kernel-team@meta.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lizefan.x@bytedance.com \
--cc=lnyng@meta.com \
--cc=mhocko@suse.com \
--cc=mkoutny@suse.com \
--cc=muchun.song@linux.dev \
--cc=nphamcs@gmail.com \
--cc=roman.gushchin@linux.dev \
--cc=shakeel.butt@linux.dev \
--cc=tj@kernel.org \
/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