[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9a0c07b9-5bf0-4251-8609-fbaf0ca75bf9@redhat.com>
Date: Mon, 8 Sep 2025 13:32:05 +0200
From: David Hildenbrand <david@...hat.com>
To: Kiryl Shutsemau <kirill@...temov.name>, Lance Yang <lance.yang@...ux.dev>
Cc: akpm@...ux-foundation.org, Liam.Howlett@...cle.com, baohua@...nel.org,
baolin.wang@...ux.alibaba.com, dev.jain@....com,
linux-kernel@...r.kernel.org, linux-mm@...ck.org,
lorenzo.stoakes@...cle.com, npache@...hat.com, ryan.roberts@....com,
usamaarif642@...il.com, ziy@...dia.com
Subject: Re: [PATCH v2 1/1] mm: skip mlocked THPs that are underused early in
deferred_split_scan()
On 08.09.25 12:38, Kiryl Shutsemau wrote:
> On Mon, Sep 08, 2025 at 05:07:41PM +0800, Lance Yang wrote:
>> From: Lance Yang <lance.yang@...ux.dev>
>>
>> When we stumble over a fully-mapped mlocked THP in the deferred shrinker,
>> it does not make sense to try to detect whether it is underused, because
>> try_to_map_unused_to_zeropage(), called while splitting the folio, will not
>> actually replace any zeroed pages by the shared zeropage.
>
> It makes me think, does KSM follows the same logic as
> try_to_map_unused_to_zeropage()?
>
> I cannot immediately find what prevents KSM from replacing zeroed mlocked
> folio with ZERO_PAGE().
>
> Hm?
I assume if you're using mlock and at the same time enable KSM for a
process/VMA, you're doing something wrong.
In contrast, THP is supposed to be transparent (yeah, I know ...).
--
Cheers
David / dhildenb
Powered by blists - more mailing lists