linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: John Hubbard <jhubbard@nvidia.com>
To: Ryan Roberts <ryan.roberts@arm.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Zenghui Yu <yuzenghui@huawei.com>,
	Matthew Wilcox <willy@infradead.org>,
	David Hildenbrand <david@redhat.com>,
	Kefeng Wang <wangkefeng.wang@huawei.com>, Zi Yan <ziy@nvidia.com>,
	Barry Song <21cnbao@gmail.com>,
	Alistair Popple <apopple@nvidia.com>,
	William Kucharski <william.kucharski@oracle.com>
Cc: linux-mm@kvack.org, Barry Song <v-songbaohua@oppo.com>
Subject: Re: [PATCH v2] tools/mm: Add thpmaps script to dump THP usage info
Date: Tue, 16 Jan 2024 09:27:16 -0800	[thread overview]
Message-ID: <c91d7f9e-918b-4a73-bf54-ad147e1b360e@nvidia.com> (raw)
In-Reply-To: <82dcfef7-7323-482e-8a27-98530570688e@arm.com>

On 1/16/24 00:53, Ryan Roberts wrote:
> On 15/01/2024 21:30, John Hubbard wrote:
>> On 1/15/24 07:56, Ryan Roberts wrote:
>> ...
>>   -----
>>   When run without options, cgroups v1 or v2 (depending on what is active
>>   on the system) is used in order to get a listing of all user space pids.
>>   That pid list is passed into the core script, as if the user had provided
>>   "--pids pid1 pid2 ...".
>>   -----
> 
> Agree with the sentiment; I'll add something similar. Although, I'm no longer
> using cgroups to get all the pids - I'm grabbing them from /proc.
> 
> --8<--
> When run with --pid, the user explicitly specifies the set of pids to scan. e.g.
> "--pid 10 [--pid 134 ...]". When run with --cgroup, the user passes either a v1
> or v2 cgroup and all pids that belong to the cgroup subtree are scanned. When
> run with neither --pid nor --cgroup, the full set of pids on the system is
> gathered from /proc and scanned as if the user had provided "--pid 1 --pid 2 ...".
> --8<--
> 

Sounds good.

>>
>> This reminds me that maybe a --pids options is helpful, what do you think?
> 
> How about I allow --pid to be specified multiple times? That will make the
> parsing easier (and be consistent with the way it works for --cont):
> 
> --pid 1 --pid 2 --pid 3 ...
> 

Sure, that works nicely.


thanks,
-- 
John Hubbard
NVIDIA



      reply	other threads:[~2024-01-16 17:28 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-10 17:32 Ryan Roberts
2024-01-10 23:21 ` John Hubbard
2024-01-11  0:11   ` John Hubbard
2024-01-11  3:32     ` John Hubbard
2024-01-11 11:54   ` Ryan Roberts
2024-01-11 17:32     ` Ryan Roberts
2024-01-11 18:01       ` David Hildenbrand
2024-01-11 18:04       ` John Hubbard
2024-01-12 10:01         ` Ryan Roberts
2024-01-11 18:17     ` John Hubbard
2024-01-12 10:00       ` Ryan Roberts
2024-01-12 19:14         ` John Hubbard
2024-01-15  9:48           ` Ryan Roberts
2024-01-15 15:56             ` Ryan Roberts
2024-01-15 21:30               ` John Hubbard
2024-01-16  8:53                 ` Ryan Roberts
2024-01-16 17:27                   ` John Hubbard [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=c91d7f9e-918b-4a73-bf54-ad147e1b360e@nvidia.com \
    --to=jhubbard@nvidia.com \
    --cc=21cnbao@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=apopple@nvidia.com \
    --cc=david@redhat.com \
    --cc=linux-mm@kvack.org \
    --cc=ryan.roberts@arm.com \
    --cc=v-songbaohua@oppo.com \
    --cc=wangkefeng.wang@huawei.com \
    --cc=william.kucharski@oracle.com \
    --cc=willy@infradead.org \
    --cc=yuzenghui@huawei.com \
    --cc=ziy@nvidia.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