Re: [PATCH v2 1/2] mm/mm_slot.h: add a helper function mm_slot_remove
From: Zi Yan
Date: Mon Jul 13 2026 - 10:04:54 EST
On 13 Jul 2026, at 2:37, xu.xin16@xxxxxxxxxx wrote:
> From: xu xin <xu.xin16@xxxxxxxxxx>
>
> Both THP and KSM manage per-mm scanning slots using the mm_slot
> structure. The slot is kept in a hash table and a list, and removal from
> both containers requires the same two operations: hash_del() and
> list_del().
>
> Introduce mm_slot_remove() to abstract the common hash_del() + list_del()
> sequence used in both khugepaged and KSM.
>
> No functional change is intended.
>
> Signed-off-by: xu xin <xu.xin16@xxxxxxxxxx>
> ---
> mm/khugepaged.c | 6 ++----
> mm/ksm.c | 9 +++------
> mm/mm_slot.h | 5 +++++
> 3 files changed, 10 insertions(+), 10 deletions(-)
>
LGTM.
Reviewed-by: Zi Yan <ziy@xxxxxxxxxx>
Best Regards,
Yan, Zi