On 2025/8/4 23:40, Usama Arif wrote:
From: David Hildenbrand <david@xxxxxxxxxx> Let's allow for making MADV_COLLAPSE succeed on areas that neither have VM_HUGEPAGE nor VM_NOHUGEPAGE when we have THP disabled unless explicitly advised (PR_THP_DISABLE_EXCEPT_ADVISED). MADV_COLLAPSE is a clear advice that we want to collapse. Note that we still respect the VM_NOHUGEPAGE flag, just like MADV_COLLAPSE always does. So consequently, MADV_COLLAPSE is now only refused on VM_NOHUGEPAGE with PR_THP_DISABLE_EXCEPT_ADVISED, including for shmem. Co-developed-by: Usama Arif <usamaarif642@xxxxxxxxx> Signed-off-by: Usama Arif <usamaarif642@xxxxxxxxx> Signed-off-by: David Hildenbrand <david@xxxxxxxxxx> ---
LGTM. Reviewed-by: Baolin Wang <baolin.wang@xxxxxxxxxxxxxxxxx>