[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251226100337.4171191-1-zhangqilong3@huawei.com>
Date: Fri, 26 Dec 2025 18:03:35 +0800
From: Zhang Qilong <zhangqilong3@...wei.com>
To: <akpm@...ux-foundation.org>, <david@...nel.org>,
<lorenzo.stoakes@...cle.com>, <corbet@....net>
CC: <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>,
<willy@...radead.org>, <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>,
<zhangqilong3@...wei.com>
Subject: [PATCH next v2 0/2] THP COW support for private executable file mmap
This patch series implementate THP COW for private executable file mmap.
It's major designed to improve the performance of hotpatch programs, and
reusing 'vma->vm_flags' hints to determine whether to trigger the exec
THP COW.
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.
v2:
- Add MySQL and internal program test results
Zhang Qilong (2):
mm/huge_memory: Implementation of THP COW for executable file mmap
mm/huge_memory: Use per-VMA hugepage flag hints for exec THP COW
include/linux/huge_mm.h | 1 +
mm/huge_memory.c | 91 +++++++++++++++++++++++++++++++++++++++++
mm/memory.c | 15 +++++++
3 files changed, 107 insertions(+)
--
2.43.0
Powered by blists - more mailing lists