From: Dmitry Yakunin <zeil@nebius.com>
To: "tj@kernel.org" <tj@kernel.org>
Cc: "cgroups@vger.kernel.org" <cgroups@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
NB-Core Team <NB-CoreTeam@nebius.com>,
"hannes@cmpxchg.org" <hannes@cmpxchg.org>,
"mhocko@kernel.org" <mhocko@kernel.org>,
Konstantin Khlebnikov <khlebnikov@yandex-team.ru>,
Andrey Ryabinin <arbn@yandex-team.com>
Subject: Re: [RFC PATCH 1/3] cgroup: list all subsystem states in debugfs files
Date: Wed, 13 Sep 2023 12:33:21 +0200 [thread overview]
Message-ID: <476c3048-0009-4ac8-bfd2-40411a4ec094@nebius.com> (raw)
In-Reply-To: <ZP9itivlZQIb5wZ0@mtj.duckdns.org>
Thank you for pointing out to drgn scripts in kernel source tree, didn't
know about them, I will take a look.
On 11.09.2023 20:55, tj@kernel.org wrote:
> On Mon, Sep 11, 2023 at 07:55:15AM +0000, Yakunin, Dmitry (Nebius) wrote:
>> +static void mem_cgroup_css_dump(struct cgroup_subsys_state *css,
>> + struct seq_file *m)
>> +{
>> + struct mem_cgroup *memcg = mem_cgroup_from_css(css);
>> +
>> + seq_printf(m, "mem_id=%u memory=%lu memsw=%lu kmem=%lu tcpmem=%lu shmem=%lu",
>> + mem_cgroup_id(memcg),
>> + page_counter_read(&memcg->memory),
>> + page_counter_read(&memcg->memsw),
>> + page_counter_read(&memcg->kmem),
>> + page_counter_read(&memcg->tcpmem),
>> + memcg_page_state(memcg, NR_SHMEM));
>> +}
> Can you please take a look at drgn (https://github.com/osandov/drgn) and see
> whether that satifies your needs? We can easily add drgn scripts under tools
> directory too (e.g. iocost already does that).
>
> Thanks.
>
> --
> tejun
next prev parent reply other threads:[~2023-09-13 10:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-11 7:55 [RFC PATCH 0/3] Helpers for debugging dying cgroups Yakunin, Dmitry (Nebius)
2023-09-11 7:55 ` [RFC PATCH 1/3] cgroup: list all subsystem states in debugfs files Yakunin, Dmitry (Nebius)
2023-09-11 18:55 ` tj
2023-09-13 10:33 ` Dmitry Yakunin [this message]
2023-09-11 22:16 ` Yosry Ahmed
2023-09-13 10:35 ` Dmitry Yakunin
2023-09-11 7:55 ` [RFC PATCH 2/3] proc/kpagecgroup: report also inode numbers of offline cgroups Yakunin, Dmitry (Nebius)
2023-09-11 7:55 ` [RFC PATCH 3/3] tools/mm/page-types: add flag for showing inodes " Yakunin, Dmitry (Nebius)
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=476c3048-0009-4ac8-bfd2-40411a4ec094@nebius.com \
--to=zeil@nebius.com \
--cc=NB-CoreTeam@nebius.com \
--cc=arbn@yandex-team.com \
--cc=cgroups@vger.kernel.org \
--cc=hannes@cmpxchg.org \
--cc=khlebnikov@yandex-team.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--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