[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aXi-r2P3OJM8neCp@hyeyoo>
Date: Tue, 27 Jan 2026 22:33:35 +0900
From: Harry Yoo <harry.yoo@...cle.com>
To: Jane Chu <jane.chu@...cle.com>
Cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org, stable@...r.kernel.org,
muchun.song@...ux.dev, osalvador@...e.de, david@...nel.org,
linmiaohe@...wei.com, jiaqiyan@...gle.com, william.roche@...cle.com,
rientjes@...gle.com, akpm@...ux-foundation.org,
lorenzo.stoakes@...cle.com, Liam.Howlett@...cle.com, rppt@...nel.org,
surenb@...gle.com, mhocko@...e.com, willy@...radead.org, clm@...a.com
Subject: Re: [PATCH v7 1/2] mm/memory-failure: fix missing ->mf_stats count
in hugetlb poison
On Tue, Jan 20, 2026 at 04:22:33PM -0700, Jane Chu wrote:
> When a newly poisoned subpage ends up in an already poisoned hugetlb
> folio, 'num_poisoned_pages' is incremented, but the per node ->mf_stats
> is not. Fix the inconsistency by designating action_result() to update
> them both.
>
> While at it, define __get_huge_page_for_hwpoison() return values in terms
> of symbol names for better readibility. Also rename
> folio_set_hugetlb_hwpoison() to hugetlb_update_hwpoison() since the
> function does more than the conventional bit setting and the fact
> three possible return values are expected.
>
> Fixes: 18f41fa616ee ("mm: memory-failure: bump memory failure stats to pglist_data")
> Cc: <stable@...r.kernel.org>
> Signed-off-by: Jane Chu <jane.chu@...cle.com>
> Acked-by: Miaohe Lin <linmiaohe@...wei.com>
> ---
> v6 -> v7:
> collect acked-by, fix nits pointed out by Miaohe
> v5 -> v6:
> comments from Miaohe.
> v5 -> v4:
> fix a bug pointed out by William and Chris, add comment.
> v3 -> v4:
> incorporate/adapt David's suggestions.
> v2 -> v3:
> No change.
> v1 -> v2:
> adapted David and Liam's comment, define __get_huge_page_for_hwpoison()
> return values in terms of symbol names instead of naked integers for better
> readibility. #define instead of enum is used since the function has footprint
> outside MF, just try to limit the MF specifics local.
> also renamed folio_set_hugetlb_hwpoison() to hugetlb_update_hwpoison()
> since the function does more than the conventional bit setting and the
> fact three possible return values are expected.
>
> ---
It might be bit late to review, but FWIW:
Reviewed-by: Harry Yoo <harry.yoo@...cle.com>
--
Cheers,
Harry / Hyeonggon
Powered by blists - more mailing lists