Re: [PATCH 3/8] mm/khugepaged: introduce a count_collapse_event() helper

From: Usama Arif

Date: Mon Jul 06 2026 - 13:24:45 EST


On Mon, 6 Jul 2026 09:44:50 -0600 Nico Pache <npache@xxxxxxxxxx> wrote:

> Provide a simple helper function to help reduce a often used, and
> duplicate pattern across the khugepaged code.
>
> When collapsing to a PMD we need to record a vm_event and the mTHP_stat
> event. When doing mTHP collapse we only update the mTHP stat.
>
> Signed-off-by: Nico Pache <npache@xxxxxxxxxx>
> ---
> mm/khugepaged.c | 36 ++++++++++++++++++------------------
> 1 file changed, 18 insertions(+), 18 deletions(-)
>

Acked-by: Usama Arif <usama.arif@xxxxxxxxx>