[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2466c068-ccd7-41a1-bef7-6f3fefc6ff55@lucifer.local>
Date: Tue, 16 Sep 2025 10:39:53 +0100
From: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>
To: Kiryl Shutsemau <kirill@...temov.name>
Cc: Lance Yang <lance.yang@...ux.dev>, Hugh Dickins <hughd@...gle.com>,
akpm@...ux-foundation.org, david@...hat.com, ziy@...dia.com,
baolin.wang@...ux.alibaba.com, Liam.Howlett@...cle.com,
npache@...hat.com, ryan.roberts@....com, dev.jain@....com,
baohua@...nel.org, ioworker0@...il.com, linux-kernel@...r.kernel.org,
linux-mm@...ck.org
Subject: Re: [PATCH mm-new 1/3] mm/khugepaged: skip unsuitable VMAs earlier
in khugepaged_scan_mm_slot()
On Tue, Sep 16, 2025 at 10:29:11AM +0100, Kiryl Shutsemau wrote:
> On Tue, Sep 16, 2025 at 02:21:26PM +0800, Lance Yang wrote:
> > Users of mlock() expect low and predictable latency. THP collapse is a
> > heavy operation that introduces exactly the kind of unpredictable delays
> > they want to avoid. It has to unmap PTEs, copy data from the small folios
> > to a new THP, and then remap the THP back to the PMD ;)
>
> Generally, we allow minor page faults into mlocked VMAs and avoid major.
> This is minor page fault territory in my view.
Hm, but we won't be causing minor faults via reclaim right, since they're
not on any LRU?
>
> Also it is very similar to what compaction does and we allow compaction
> of mlocked VMA by default, unless sysctl vm.compact_unevictable_allowed
> is set to zero.
This is a much stronger point.
I think we are sometimes too vague as to what mlock() means in
totality. But given that we default allow compaction it seems sensible to
keep this behaviour the same.
Unless you have a specific situation where this is problematic Lance?
>
> --
> Kiryl Shutsemau / Kirill A. Shutemov
Cheers, Lorenzo
Powered by blists - more mailing lists