From: Ye Liu <ye.liu@linux.dev>
To: yang.yang29@zte.com.cn
Cc: bsingharora@gmail.com, linux-kernel@vger.kernel.org,
liuye@kylinos.cn, linux-mm@kvack.org, akpm@linux-foundation.org
Subject: Re: [PATCH] delayacct: use macro to simplify delayacct_end calls
Date: Mon, 21 Apr 2025 10:44:41 +0800 [thread overview]
Message-ID: <d4df6a61-f70b-4b79-9494-ddc571382674@linux.dev> (raw)
In-Reply-To: <20250420115848388DXE4HgOnwCNl4IjrMloB6@zte.com.cn>
在 2025/4/20 11:58, yang.yang29@zte.com.cn 写道:
> Hi Ye Liu
>
>> Replace repetitive calls to delayacct_end() with a new macro
>> DELAYACCT_END to reduce code duplication.
>> No functional changes.
> Please CC akpm@linux-foundation.org and linux-mm@kvack.org
> next time.
>
> I think it's a good idea to use macros to reduce code duplication in
> functions. So what about also use macros to define
> void __delayacct_##type##_end().
Most functions can be replaced with macros, but considering that the
parameters of __delayacct_thrashing_end in this batch of functions are
inconsistent, is it worth using macro definitions only for other
functions? Or do you have any good ideas?
void __delayacct_blkio_end(struct task_struct *p)
void __delayacct_freepages_end(void)
void __delayacct_thrashing_end(bool *in_thrashing)
void __delayacct_swapin_end(void)
void __delayacct_compact_end(void)
void __delayacct_wpcopy_end(void)
Thanks,
Ye Liu
> Thanks!
prev parent reply other threads:[~2025-04-21 2:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20250414063227.97035-1-ye.liu@linux.dev>
2025-04-20 3:58 ` yang.yang29
2025-04-21 2:44 ` Ye Liu [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=d4df6a61-f70b-4b79-9494-ddc571382674@linux.dev \
--to=ye.liu@linux.dev \
--cc=akpm@linux-foundation.org \
--cc=bsingharora@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=liuye@kylinos.cn \
--cc=yang.yang29@zte.com.cn \
/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