Re: [PATCH mm-new 1/1] mm/khugepaged: Factor out common logic in [scan,alloc]_sleep_millisecs_store()

Zi Yan
2025-10-20T20:01:25Z

On 20 Oct 2025, at 7:53, Leon Hwang wrote:

> Both scan_sleep_millisecs_store() and alloc_sleep_millisecs_store()
> perform the same operations: parse the input value, update their
> respective sleep interval, reset khugepaged_sleep_expire, and wake up
> the khugepaged thread.
>
> Factor out this duplicated logic into a helper function
> __sleep_millisecs_store(), and simplify both store functions.
>
> No functional change intended.
>
> Signed-off-by: Leon Hwang <leon.hwang@linux.dev>
> ---
> mm/khugepaged.c | 29 ++++++++++++++---------------
> 1 file changed, 14 insertions(+), 15 deletions(-)
>
With the changes suggested by Lorenzo, feel free to add
Reviewed-by: Zi Yan <ziy@nvidia.com>

--
Best Regards,
Yan, Zi