Re: [PATCH v2 2/4] mm/shmem, swap: avoid redundant Xarray lookup during swapin

From: Dev Jain
Date: Thu Jun 19 2025 - 23:34:56 EST



On 19/06/25 11:25 pm, Kairui Song wrote:
From: Kairui Song <kasong@xxxxxxxxxxx>

Currently shmem calls xa_get_order to get the swap radix entry order,
requiring a full tree walk. This can be easily combined with the swap
entry value checking (shmem_confirm_swap) to avoid the duplicated
lookup, which should improve the performance.

Signed-off-by: Kairui Song <kasong@xxxxxxxxxxx>
Reviewed-by: Kemeng Shi <shikemeng@xxxxxxxxxxxxxxx>
---

Reviewed-by: Dev Jain <dev.jain@xxxxxxx>