Linux Perf Users
 help / color / mirror / Atom feed
* [PATCH 0/4] perf bench mem: Add support for PROT_MTE
@ 2026-12-01 12:11 Pierre-Clément Tosi
  2026-12-01 12:11 ` [PATCH 1/4] perf bench mem: Report why mmap() failed Pierre-Clément Tosi
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Pierre-Clément Tosi @ 2026-12-01 12:11 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo, Namhyung Kim, Ian Rogers, James Clark
  Cc: Ankur Arora, linux-perf-users, linux-kernel,
	Pierre-Clément Tosi, Catalin Marinas, Ryan Roberts,
	linux-arm-kernel

This series extend 'perf bench' to measure the overhead of mapping MTE
Tagged Memory to userspace, which is useful when evaluating the impact
of a change to page data and tag clearing within the kernel. It adds a
new --prot flag enabling callers to pass PROT_MTE during mmap().

Note that memcpy/memset are also taught about --prot as a side-effect.

As a result, users can reliably measure page tagging through e.g.

  perf bench mem mmap -f populate --prot write,mte -s 128MB

Tested with arm64 (GCC) and x86-64 (GCC and Clang) builds.

(Applies cleanly to perf-tools-next at commit 4a7008f739a3)

Signed-off-by: Pierre-Clément Tosi <ptosi@google.com>
---
Pierre-Clément Tosi (4):
      perf bench mem: Report why mmap() failed
      perf bench mem: Pass bench_params to bench_mmap()
      perf bench mem: Add --prot option
      perf bench mem: Support PROT_MTE on arm64

 tools/perf/Documentation/perf-bench.txt |  21 +++++
 tools/perf/bench/mem-functions.c        | 135 ++++++++++++++++++++++++--------
 2 files changed, 123 insertions(+), 33 deletions(-)
---
base-commit: 4a7008f739a30ee4c22d9f21af362a5128f2628d
change-id: 20261201-perf-prot-mte-0ffbf9bc2f7a

Best regards,
-- 
Pierre-Clément Tosi <ptosi@google.com>


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

end of thread, other threads:[~2026-12-01 12:28 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-01 12:11 [PATCH 0/4] perf bench mem: Add support for PROT_MTE Pierre-Clément Tosi
2026-12-01 12:11 ` [PATCH 1/4] perf bench mem: Report why mmap() failed Pierre-Clément Tosi
2026-12-01 12:11 ` [PATCH 2/4] perf bench mem: Pass bench_params to bench_mmap() Pierre-Clément Tosi
2026-12-01 12:11 ` [PATCH 3/4] perf bench mem: Add --prot option Pierre-Clément Tosi
2026-12-01 12:28   ` sashiko-bot
2026-12-01 12:11 ` [PATCH 4/4] perf bench mem: Support PROT_MTE on arm64 Pierre-Clément Tosi
2026-12-01 12:28 ` [PATCH 0/4] perf bench mem: Add support for PROT_MTE sashiko-bot

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