[PATCH v2 0/2] mm/hugetlb: dissolve gigantic pages without runtime support
Longlong Xia <[email protected]>
| Newsgroups | org.kvack.linux-mm,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
From: Longlong Xia <[email protected]> v2 of the dissolve fix. It now carries the cleanup David asked for as a separate patch, and is split so the minimal bug fix can go to -stable on its own. 1/2 - mm/hugetlb: do not dissolve gigantic pages without runtime support dissolve_free_hugetlb_folio() doesn't check hstate_is_gigantic_no_runtime(h); the helpers bail for such hstates, so dissolving leaves the folio on the free list and the add_hugetlb_folio() rollback on vmemmap restore failure corrupts that list. Bail out before touching the accounting. (Fixes, -stable candidate.) 2/2 - mm/hugetlb: warn instead of silently bailing gigantic pages without runtime support Per David's review: turn the silent bail in remove_hugetlb_folio()/__update_and_free_hugetlb_folio() into a VM_WARN_ON_ONCE. All callers already filter gigantic_no_runtime upstream. (no Fixes, -next only.) Changes in v2 (vs the single v1 patch): - Split into [1/2] bug fix and [2/2] cleanup so the fix stays minimal for -stable and the diagnostic cleanup is -next only. - [2/2] is new, per David's review ("VM_WARN_ON() instead of handling it silently"). - [1/2] differs from v1 only by a comment reword. Link: https://lore.kernel.org/r/[email protected] Link: https://sashiko.dev/#/patchset/[email protected] Longlong Xia (2): mm/hugetlb: do not dissolve gigantic pages without runtime support mm/hugetlb: warn instead of silently bailing gigantic pages without runtime support mm/hugetlb.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) -- 2.43.0