Re: [PATCH v3 1/3] mm/page_alloc/vmstat: Simplify refresh_cpu_vm_stats change detection
From: Vlastimil Babka
Date: Fri Oct 10 2025 - 08:44:36 EST
On 10/2/25 22:46, Joshua Hahn wrote:
> Currently, refresh_cpu_vm_stats returns an int, indicating how many
> changes were made during its updates. Using this information, callers
> like vmstat_update can heuristically determine if more work will be done
> in the future.
>
> However, all of refresh_cpu_vm_stats's callers either (a) ignore the
> result, only caring about performing the updates, or (b) only care about
> whether changes were made, but not *how many* changes were made.
>
> Simplify the code by returning a bool instead to indicate if updates
> were made.
>
> In addition, simplify fold_diff and decay_pcp_high to return a bool
> for the same reason.
>
> Signed-off-by: Joshua Hahn <joshua.hahnjy@xxxxxxxxx>
Reviewed-by: Vlastimil Babka <vbabka@xxxxxxx>