[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <a083a5ca-bac8-44b5-8604-638c5eb4102a@kernel.org>
Date: Tue, 30 Dec 2025 22:42:34 +0100
From: "David Hildenbrand (Red Hat)" <david@...nel.org>
To: Matthew Wilcox <willy@...radead.org>,
Zhang Qilong <zhangqilong3@...wei.com>
Cc: akpm@...ux-foundation.org, lorenzo.stoakes@...cle.com, corbet@....net,
ziy@...dia.com, baolin.wang@...ux.alibaba.com, Liam.Howlett@...cle.com,
npache@...hat.com, ryan.roberts@....com, dev.jain@....com,
baohua@...nel.org, lance.yang@...ux.dev, vbabka@...e.cz, rppt@...nel.org,
surenb@...gle.com, mhocko@...e.com, wangkefeng.wang@...wei.com,
sunnanyong@...wei.com, linux-mm@...ck.org, linux-doc@...r.kernel.org,
linux-kernel@...r.kernel.org, lianux.mm@...il.com,
Nadav Amit <namit@...are.com>
Subject: Re: [PATCH next v2 0/2] THP COW support for private executable file
mmap
On 12/28/25 04:42, Matthew Wilcox wrote:
> On Fri, Dec 26, 2025 at 06:03:35PM +0800, Zhang Qilong wrote:
>> The MySQL (Ver 8.0.25) test results on AMD are as follows:
>>
>> -------------------------------------------------------------------
>> | Exec mmap Rss(kB) | Measured tpmC (NewOrders) |
>> -----------------|--------------------|---------------------------|
>> base(page COW) | 32868 | 339686 |
>> -----------------|--------------------|---------------------------|
>> exec THP COW | 43516 | 371324 |
>> -------------------------------------------------------------------
>>
>> The MySQL using exec THP COW consumes an additional 10648 kB of memory
>> but achieves 9.3% performance improvement in the scenario of hotpatch.
>> Additionally, another our internal program achieves approximately a 5%
>> performance improvement as well.
>>
>> As result, using exec THP COW will consume additional memory. The
>> additional memory consumption may be negligible for the current system.
>> It's necessary to balance the memory consumption with the performance
>> impact.
>
> I mean ... you say "negligible", I saay "32% extra". 9% performance
> gain is certainly nothing to sneer at (and is consistent with measured
> performance gains from using large folios for, eg, kernel compiles).
> But wow, that's a lot of extra memory. My feeling is that we shouldn't
> add this functionality, but I'd welcome other opinions.
Also, I wonder whether there aren't other approaches for such code
patching where user space is able to create THPs more effectively?
Handling creation of a patched file version etc in user space.
E.g., I'd assume that a single "patched" version (with a single THP) for
multiple program instances could be beneficial over one patched version
per program instance.
Which type of code patching does hotpatch perform?
--
Cheers
David
Powered by blists - more mailing lists