Re: [PATCH 2/5] mm/huge_memory: convert "tva_flags" to "enum tva_type" for thp_vma_allowable_order*()

From: David Hildenbrand
Date: Mon Jul 28 2025 - 09:29:07 EST


On 25.07.25 18:22, Usama Arif wrote:
From: David Hildenbrand <david@xxxxxxxxxx>

Describing the context through a type is much clearer, and good enough
for our case.

We have:
* smaps handling for showing "THPeligible"
* Pagefault handling
* khugepaged handling
* Forced collapse handling: primarily MADV_COLLAPSE, but one other odd case

Really, we want to ignore sysfs only when we are forcing a collapse
through MADV_COLLAPSE, otherwise we want to enforce.

With this change, we immediately know if we are in the forced collapse
case, which will be valuable next.

Signed-off-by: David Hildenbrand <david@xxxxxxxxxx>
Acked-by: Usama Arif <usamaarif642@xxxxxxxxx>

Nit: if you forward patches untouched, make sure to add your SOB as well.

--
Cheers,

David / dhildenb