summaryrefslogtreecommitdiff
path: root/tools/perf/Documentation
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@kernel.org>2026-02-18 16:44:17 -0800
committerNamhyung Kim <namhyung@kernel.org>2026-02-26 10:54:12 -0800
commitc1f70c83be55e6721267f850dbfaf2ae07a04858 (patch)
tree0b298997a25e37440426a62d61e2dda9678ee241 /tools/perf/Documentation
parentaf894feb32570cafea582b100d674b042479544f (diff)
downloadlinux-next-c1f70c83be55e6721267f850dbfaf2ae07a04858.tar.gz
linux-next-c1f70c83be55e6721267f850dbfaf2ae07a04858.zip
perf bench: Add -t/--threads option to perf bench mem mmap
So that it can measure overhead of mmap_lock and/or per-VMA lock contention. $ perf bench mem mmap -f demand -l 1000 -t 1 # Running 'mem/mmap' benchmark: # function 'demand' (Demand loaded mmap()) # Copying 1MB bytes ... 2.786858 GB/sec $ perf bench mem mmap -f demand -l 1000 -t 2 # Running 'mem/mmap' benchmark: # function 'demand' (Demand loaded mmap()) # Copying 1MB bytes ... 1.624468 GB/sec/thread ( +- 0.30% ) $ perf bench mem mmap -f demand -l 1000 -t 3 # Running 'mem/mmap' benchmark: # function 'demand' (Demand loaded mmap()) # Copying 1MB bytes ... 1.493068 GB/sec/thread ( +- 0.15% ) $ perf bench mem mmap -f demand -l 1000 -t 4 # Running 'mem/mmap' benchmark: # function 'demand' (Demand loaded mmap()) # Copying 1MB bytes ... 1.006087 GB/sec/thread ( +- 0.41% ) Reviewed-by: Ankur Arora <ankur.a.arora@oracle.com> Reviewed-by: James Clark <james.clark@linaro.org> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Diffstat (limited to 'tools/perf/Documentation')
-rw-r--r--tools/perf/Documentation/perf-bench.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/perf/Documentation/perf-bench.txt b/tools/perf/Documentation/perf-bench.txt
index 1160224cb718..c5913cf59c98 100644
--- a/tools/perf/Documentation/perf-bench.txt
+++ b/tools/perf/Documentation/perf-bench.txt
@@ -274,6 +274,10 @@ Repeat mmap() invocation this number of times.
--cycles::
Use perf's cpu-cycles event instead of gettimeofday syscall.
+-t::
+--threads=<NUM>::
+Create multiple threads to call mmap/munmap concurrently.
+
SUITES FOR 'numa'
~~~~~~~~~~~~~~~~~
*mem*::