Re: [PATCH v1] mm/huge_memory: improve split_huge_page_to_list_to_order() return value documentation

From: Zi Yan
Date: Mon Apr 22 2024 - 10:35:19 EST


On 18 Apr 2024, at 11:18, David Hildenbrand wrote:

> The documentation is wrong and relying on it almost resulted in BUGs
> in new callers: we return -EAGAIN on unexpected folio references, not
> -EBUSY.

+Baolin

The code was changed at the commit fd4a7ac32918 ("mm: migrate: try again
if THP split is failed due to page refcnt") without changing the comment.

>
> Let's fix that and also document which other return values we can
> currently see and why they could happen.
>
> Cc: John Hubbard <jhubbard@xxxxxxxxxx>
> Cc: Zi Yan <ziy@xxxxxxxxxx>
> Cc: Matthew Wilcox <willy@xxxxxxxxxxxxx>
> Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
> Signed-off-by: David Hildenbrand <david@xxxxxxxxxx>
> ---
> mm/huge_memory.c | 13 ++++++++++---
> 1 file changed, 10 insertions(+), 3 deletions(-)

The changes look good to me. Thanks. Reviewed-by: Zi Yan <ziy@xxxxxxxxxx>

--
Best Regards,
Yan, Zi

Attachment: signature.asc
Description: OpenPGP digital signature