linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: wang lian <lianux.mm@gmail.com>
To: Kiryl Shutsemau <kirill@shutemov.name>
Cc: Liam.Howlett@oracle.com, akpm@linux-foundation.org,
	david@redhat.com, linux-mm@kvack.org, lorenzo.stoakes@oracle.com,
	mhocko@suse.com, rppt@kernel.org, surenb@google.com,
	usamaarif642@gmail.com, vbabka@suse.cz
Subject: Re: [PATCH] tools/mm: Add madvise tool
Date: Mon, 8 Sep 2025 09:09:36 +0800	[thread overview]
Message-ID: <68DCB9F1-9BAB-44B0-826F-63F1708895D3@gmail.com> (raw)
In-Reply-To: <kve7xndhm4hzaglmzrpjiw22ut3yvcyb44n3oxx7cayiglhzh7@wwpgldcgl2p3>

[-- Attachment #1: Type: text/plain, Size: 1823 bytes --]



> On Sep 5, 2025, at 18:28, Kiryl Shutsemau <kirill@shutemov.name> wrote:
> 
> On Fri, Sep 05, 2025 at 11:26:13AM +0800, wang lian wrote:
>> 
>>> Add a simple tool that allows to issue an advice on a process or a file.
>> 
>>> It can be useful to experiment with effects of an advice on a workload
>>> without modifying the workload itself.
>> 
>>> Only supports advices available for process_madvise().
>> 
>>> Signed-off-by: Kiryl Shutsemau <kas@kernel.org>
>>> ---
>> 
>> ...
>>> +#define PMD_SIZE_FILE_PATH "/sys/kernel/mm/transparent_hugepage/hpage_pmd_size"
>> 
>> Hi Kiryl,
>> 
>> Thanks for this patch, this is a very nice and useful tool.
>> 
>> I just have some super minor nitpick on coding style:
>> (a) Maybe move the #define PMD_SIZE_FILE_PATH to the top of the file, 
>> right after the #include statements?
> 
> Maybe. Will do if v2 is required.
> 
>> (b) use consistent comment style like this /* */ 
> 
> See answer to David.
> 
>> (c) when i test, when process_madvise test fail it give some message,
>> i think it should add into in the prompt message ,like this 
>>> printf("madvise TARGET ADVICE START END\n\n");
>> printf("should run as root\n\n");
>> printf("\t\tStart and end addressed for the advice. Must be page-aligned and valid target pid address.\n\n");
> 
> It doesn't need root. If your target is PID, it requires the target
> process to be ptraceable for you. Whether it is or not depending on your
> setup.

Thanks for your clarify.
> 
>> Other than that, the patch looks great to me.
>> LGTM!
>> Reviewed-by: wang lian <lianux.mm@gmail.com <mailto:lianux.mm@gmail.com>>
>> Tested-by: wang lian <lianux.mm@gmail.com <mailto:lianux.mm@gmail.com>>
>> 
>> Best regards,
>> wang lian
> 
> -- 
>  Kiryl Shutsemau / Kirill A. Shutemov


[-- Attachment #2: Type: text/html, Size: 11542 bytes --]

  reply	other threads:[~2025-09-08  1:09 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-04 17:57 kirill
2025-09-04 19:07 ` Liam R. Howlett
2025-09-05  3:26 ` wang lian
2025-09-05 10:28   ` Kiryl Shutsemau
2025-09-08  1:09     ` wang lian [this message]
2025-09-05  9:17 ` Michal Hocko
2025-09-05 10:16   ` Lorenzo Stoakes
2025-09-05 10:56     ` Michal Hocko
2025-09-05 11:02       ` Lorenzo Stoakes
2025-09-05 10:21   ` Kiryl Shutsemau
2025-09-05 11:02     ` Michal Hocko
2025-09-05 10:19 ` David Hildenbrand
2025-09-05 10:24   ` Kiryl Shutsemau
2025-09-05 10:33     ` David Hildenbrand
2025-09-05 10:35       ` Kiryl Shutsemau
2025-09-05 10:37 ` Lorenzo Stoakes
2025-09-05 13:35   ` Kiryl Shutsemau
2025-09-05 16:30   ` Kiryl Shutsemau
2025-09-05 10:45 ` Usama Arif
2025-09-05 10:59 ` Mike Rapoport
2025-09-05 13:36   ` Kiryl Shutsemau
2025-09-06  8:00     ` Mike Rapoport
2025-09-08 10:04       ` Kiryl Shutsemau
2025-09-10 11:34 ` [ANNOUNCE] mm-tools: Random tools MM-related tools Kiryl Shutsemau

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=68DCB9F1-9BAB-44B0-826F-63F1708895D3@gmail.com \
    --to=lianux.mm@gmail.com \
    --cc=Liam.Howlett@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=david@redhat.com \
    --cc=kirill@shutemov.name \
    --cc=linux-mm@kvack.org \
    --cc=lorenzo.stoakes@oracle.com \
    --cc=mhocko@suse.com \
    --cc=rppt@kernel.org \
    --cc=surenb@google.com \
    --cc=usamaarif642@gmail.com \
    --cc=vbabka@suse.cz \
    /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