Re: [PATCH RFC 6/6] mm: madvise: don't split mTHP for MADV_PAGEOUT

From: Ryan Roberts
Date: Tue Feb 27 2024 - 09:40:32 EST


On 18/01/2024 11:10, Barry Song wrote:
> From: Chuanhua Han <hanchuanhua@xxxxxxxx>
>
> MADV_PAGEOUT and MADV_FREE are common cases in Android. Ryan's patchset has
> supported swapping large folios out as a whole for vmscan case. This patch
> extends the feature to madvise.
>
> If madvised range covers the whole large folio, we don't split it. Otherwise,
> we still need to split it.
>
> This patch doesn't depend on ARM64's CONT-PTE, alternatively, it defines one
> helper named pte_range_cont_mapped() to check if all PTEs are contiguously
> mapped to a large folio.

I'm going to rework this patch and integrate it into my series if that's ok with
you?