Re: [PATCH v2 2/9] mm: hugetlb: convert to account_new_hugetlb_folio()

Kefeng Wang
2025-09-08T13:20:26Z

On 2025/9/8 17:26, Oscar Salvador wrote:
> On Tue, Sep 02, 2025 at 08:48:13PM +0800, Kefeng Wang wrote:
>> In order to avoid the wrong nid passed into the account, it's better
>> to move folio_nid() into account_new_hugetlb_folio().
>
> I might need more context here because this reads like there is a potential problem
> and we are fixing something.
>
> Are we worried about a mismatch? Have we seen it? Just theoretical?

We did make such mistake before, see commit commit 382360d289c1
(mm/hugetlb: fix nid mismatch in alloc_surplus_hugetlb_folio()), so it's
better to move it inside.