Re: [PATCH v3 2/3] mm: memory-hotplug: check folio ref count first in do_migrate_range
From: Miaohe Lin
Date: Tue Feb 18 2025 - 22:15:30 EST
On 2025/2/17 9:43, Wupeng Ma wrote:
> From: Ma Wupeng <mawupeng1@xxxxxxxxxx>
>
> If a folio has an increased reference count, folio_try_get() will acquire
> it, perform necessary operations, and then release it. In the case of a
> poisoned folio without an elevated reference count (which is unlikely for
> memory-failure), folio_try_get() will simply bypass it.
>
> Therefore, relocate the folio_try_get() function, responsible for checking
> and acquiring this reference count at first.
>
> Signed-off-by: Ma Wupeng <mawupeng1@xxxxxxxxxx>
Acked-by: Miaohe Lin <linmiaohe@xxxxxxxxxx>
Thanks.
.