* Re: [PATCH] delayacct: use macro to simplify delayacct_end calls
2025-04-20 3:58 ` [PATCH] delayacct: use macro to simplify delayacct_end calls yang.yang29
@ 2025-04-21 2:44 ` Ye Liu
0 siblings, 0 replies; 2+ messages in thread
From: Ye Liu @ 2025-04-21 2:44 UTC (permalink / raw)
To: yang.yang29; +Cc: bsingharora, linux-kernel, liuye, linux-mm, akpm
在 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!
^ permalink raw reply [flat|nested] 2+ messages in thread