linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [REGRESSION]: mmap performance regression starting with k-6.1
@ 2023-11-22 20:03 Chun Ng
  2023-11-23  1:18 ` Bagas Sanjaya
  2023-11-23  5:07 ` Bagas Sanjaya
  0 siblings, 2 replies; 16+ messages in thread
From: Chun Ng @ 2023-11-22 20:03 UTC (permalink / raw)
  To: linux-kernel@vger.kernel.org
  Cc: regressions@lists.linux.dev, Andrew Morton, linux-mm@kvack.org,
	Liam.Howlett@oracle.com, Ankita Garg

Hi,

Recently I observed there is performance regression on system call mmap(..). I tried both vanilla kernels and Raspberry Pi kernels on a Raspberry Pi 4 box and the results are pretty consistent among them.

Bisection showed that the regression starts from k-6.1, and the latest vanilla k-6.7 is still showing the same regression.

The test program calls mmap/munmap for a 4K page with MAP_ANON and MAP_PRIVATE flags, and ftrace is used to measure the time spent on the do_mmap(..) call.  Measured time of a sample run with different vanilla kernel versions are:
k-5.10 and k-6.0: ~157us
k-6.1: ~194us
k-6.7: ~214us
Results are pretty consistent across multiple runs with a small percentage variance.  Ftrace shows that latency of mmap_region(...) has increased since k-6.1.  An application that makes frequent mmap(..) calls the accumulated extra latency is very noticeable. 

Please find the ftrace results and kernel config files in this folder:
https://drive.google.com/drive/folders/1qy8YTBqxu8Gdbs7IigYbSd4FXldId5sd?usp=drive_link

The test program can be found in here:
https://drive.google.com/file/d/1tG6_BbQMCHwfKebvAIAg_xqbM_lpPcuM/view?usp=sharing

Info on the testing environment:
cpufreq_governor: performance
Test machine: Raspberry Pi 4, 8GB DDR
SCHED_FIFO with priority 99 for running the test program

Vanilla kernels are not tainted. However on k-6.0 and k-6.7, I have to patch the drivers/clk/bcm/clk-raspberrypi.c file with the version in Raspberry Pi kernel tree for the CPU frequency governor to work.

Best,
Chun
[nvpublic]


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

end of thread, other threads:[~2023-11-26 13:47 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-22 20:03 [REGRESSION]: mmap performance regression starting with k-6.1 Chun Ng
2023-11-23  1:18 ` Bagas Sanjaya
2023-11-23  3:06   ` Chun Ng
2023-11-23  5:01     ` Bagas Sanjaya
2023-11-23  5:07 ` Bagas Sanjaya
2023-11-23 14:34   ` Liam R. Howlett
2023-11-24  5:08     ` Linux regression tracking #update (Thorsten Leemhuis)
     [not found]     ` <20231126071854.19490-1-00107082@163.com>
2023-11-26 13:47       ` Matthew Wilcox
2023-11-23 15:38   ` Matthew Wilcox
2023-11-24  0:15     ` Bagas Sanjaya
2023-11-24  1:04       ` Matthew Wilcox
2023-11-24 11:52         ` Greg KH
2023-11-24 15:06           ` Matthew Wilcox
2023-11-24 15:13             ` Greg KH
2023-11-24 15:29             ` Linux regression tracking (Thorsten Leemhuis)
2023-11-25  1:50               ` Chun Ng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).