linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH next v2 0/2] THP COW support for private executable file mmap
@ 2025-12-26 10:03 Zhang Qilong
  2025-12-26 10:03 ` [PATCH next v2 1/2] mm/huge_memory: Implementation of THP COW for " Zhang Qilong
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Zhang Qilong @ 2025-12-26 10:03 UTC (permalink / raw)
  To: akpm, david, lorenzo.stoakes, corbet
  Cc: ziy, baolin.wang, Liam.Howlett, npache, ryan.roberts, dev.jain,
	baohua, lance.yang, vbabka, rppt, surenb, mhocko, willy,
	wangkefeng.wang, sunnanyong, linux-mm, linux-doc, linux-kernel,
	lianux.mm, zhangqilong3

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



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-12-30 21:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-12-26 10:03 [PATCH next v2 0/2] THP COW support for private executable file mmap Zhang Qilong
2025-12-26 10:03 ` [PATCH next v2 1/2] mm/huge_memory: Implementation of THP COW for " Zhang Qilong
2025-12-26 10:03 ` [PATCH next v2 2/2] mm/huge_memory: Use per-VMA hugepage flag hints for exec THP COW Zhang Qilong
2025-12-28  3:42 ` [PATCH next v2 0/2] THP COW support for private executable file mmap Matthew Wilcox
2025-12-30 21:42   ` David Hildenbrand (Red Hat)
2025-12-30 21:39 ` David Hildenbrand (Red Hat)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox