Re: [PATCH] mm/hugetlb: add htlb_dissolve vmstat event

From: Mark Bundschuh

Date: Thu Nov 05 2026 - 14:28:28 EST


On Thu, Nov 5, 2026 at 09:46:58AM -0800, Jiaqi Yan wrote:
> > update_and_free_hugetlb_folio(h, folio, false);
> > + count_vm_event(HTLB_DISSOLVE);
>
> What if update_and_free_hugetlb_folio() failed / bailed out?

dissolve_free_hugetlb_folio() already rejects gigantic folios without
runtime support, and restores the vmemmap itself before calling it, so
the only bail out left is a folio with unreliable raw hwpoison, which is
leaked on purpose. That folio still leaves the pool, so I think it should
be counted. "frees" in the commit message is misleading though, I'll fix
that in v2.