Re: [PATCH v2 1/2] mm/mm_slot.h: add a helper function mm_slot_remove

From: Barry Song

Date: Mon Jul 13 2026 - 11:29:29 EST


On Mon, Jul 13, 2026 at 2:37 PM <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>
> ---

LGTM,
Reviewed-by: Barry Song <baohua@xxxxxxxxxx>