Files
ack-tegra/include/linux
Yabin Cui 18049c8cff perf/aux: Allocate non-contiguous AUX pages by default
perf always allocates contiguous AUX pages based on aux_watermark.
However, this contiguous allocation doesn't benefit all PMUs. For
instance, ARM SPE and TRBE operate with virtual pages, and Coresight
ETR allocates a separate buffer. For these PMUs, allocating contiguous
AUX pages unnecessarily exacerbates memory fragmentation. This
fragmentation can prevent their use on long-running devices.

This patch modifies the perf driver to be memory-friendly by default,
by allocating non-contiguous AUX pages. For PMUs requiring contiguous
pages (Intel BTS and some Intel PT), the existing
PERF_PMU_CAP_AUX_NO_SG capability can be used. For PMUs that don't
require but can benefit from contiguous pages (some Intel PT), a new
capability, PERF_PMU_CAP_AUX_PREFER_LARGE, is added to maintain their
existing behavior.

Signed-off-by: Yabin Cui <yabinc@google.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: James Clark <james.clark@linaro.org>
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/r/20250508232642.148767-1-yabinc@google.com
2025-05-15 18:07:19 +02:00
..
…
…
…
…
…
…
…
…
2025-03-21 09:46:08 +01:00
…
…
…
…
…
…
…
2025-03-21 20:57:55 -03:00
…
…
…
2025-03-13 14:15:54 +00:00
…
…
…
…
…
…
2025-02-21 17:31:45 -06:00
…
…
2025-02-21 09:54:01 +01:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2025-04-02 07:06:59 -06:00
…
2025-03-08 14:37:39 +01:00
…
…
…
…
2025-02-26 12:10:48 +01:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2025-03-20 17:33:31 -04:00
…
…
…
…
…
…
…
…
…
2025-03-17 22:06:41 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2025-02-24 12:08:51 +02:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2025-03-20 09:45:39 +01:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2025-03-10 13:13:04 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2025-03-22 15:36:49 +02:00
…
…
…
…
…
…
…
…
…
…
…
…
…
2025-03-08 12:13:25 +01:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2025-02-20 15:24:13 +01:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2025-04-15 11:32:34 +02:00
…
…
…
2025-03-17 13:54:50 +00:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2025-02-18 11:51:22 -05:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2025-03-06 15:13:13 -04:00
…
…
…
…
…
…
2025-03-27 13:14:46 -05:00
2025-03-08 15:08:45 -06:00
…
…
…
…
…
…
…
…
…
2025-03-10 08:53:40 +01:00
…
…
…
…
…
…
…
…
2025-03-12 20:41:14 +01:00
…
…
…
…
…
2025-03-16 17:40:22 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2025-03-17 11:52:25 +01:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2025-02-28 11:51:26 -08:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2025-03-20 08:00:50 -07:00
…
2025-02-28 11:51:26 -08:00
…
2025-03-25 09:15:07 -07:00
…
2025-02-28 11:51:26 -08:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2025-03-13 13:25:58 -07:00
2025-03-13 13:25:58 -07:00
2025-03-13 13:25:58 -07:00
…