Re: [PATCH 7.2 v2 01/12] mm/khugepaged: remove READ_ONLY_THP_FOR_FS check

David Hildenbrand (Arm)
2026-04-14T10:20:33Z

>> huge=never Do not allocate huge pages. This is the default.
>> huge=always Attempt to allocate huge page every time a new page is needed.
>> huge=within_size Only allocate huge page if it will be fully within i_size.
>> Also respect madvise(2) hints.
>> huge=advise Only allocate huge page if requested with madvise(2).
>>
>> so what's the difference between huge=never and huge=madvise?
>
> I think madvise means MADV_HUGEPAGE for the region, not MADV_COLLAPSE.

Yes, most likely. The doc is quite old.

--
Cheers,

David