linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] delayacct: use macro to simplify delayacct_end calls
       [not found] <20250414063227.97035-1-ye.liu@linux.dev>
@ 2025-04-20  3:58 ` yang.yang29
  2025-04-21  2:44   ` Ye Liu
  0 siblings, 1 reply; 2+ messages in thread
From: yang.yang29 @ 2025-04-20  3:58 UTC (permalink / raw)
  To: ye.liu; +Cc: bsingharora, linux-kernel, liuye, linux-mm, akpm

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().

Thanks!


^ permalink raw reply	[flat|nested] 2+ messages in thread

* 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

end of thread, other threads:[~2025-04-21  2:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20250414063227.97035-1-ye.liu@linux.dev>
2025-04-20  3:58 ` [PATCH] delayacct: use macro to simplify delayacct_end calls yang.yang29
2025-04-21  2:44   ` Ye Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox