Skip to content

perf,coresight: Reduce fragmentation with non-contiguous AUX pages for cs_etm

Yabin Cui linux-arm-kernel linux-perf-users lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 11 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2perf: Allow non-contiguous AUX buffer pages via PMU capabilityinclude/linux/perf_event.h kernel/events/ring_buffer.c+7 -07 replies
2/2coresight: etm-perf: Add AUX_NON_CONTIGUOUS_PAGES to cs_etm PMUdrivers/hwtracing/coresight/coresight-etm-perf.c+2 -14 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] perf,coresight: Reduce fragmentation with non-contiguous AUX pages for cs_etm

Hi perf maintainers,
Hi coresight maintainers,

This patch set (2 patches) addresses memory fragmentation caused by contiguous AUX buffer allocation for the cs_etm PMU on Android.

The cs_etm PMU doesn't need contiguous AUX pages, yet perf always allocates contiguous AUX pages based on aux_watermark. So repeated use of cs_etm with large buffers leads to memory fragmentation, negatively impacting other processes.

This solution introduces PERF_PMU_CAP_AUX_NON_CONTIGUOUS_PAGES to allow cs_etm to request non-contiguous AUX buffers, avoiding high-order page allocations and reducing fragmentation.

This aims to reduce memory fragmentation for Android devices when using cs_etm. Your review is appreciated.

Thanks,
Yabin

Yabin Cui (2):
perf: Allow non-contiguous AUX buffer pages via PMU capability
coresight: etm-perf: Add AUX_NON_CONTIGUOUS_PAGES to cs_etm PMU

 drivers/hwtracing/coresight/coresight-etm-perf.c | 3 ++-
 include/linux/perf_event.h                       | 1 +
 kernel/events/ring_buffer.c                      | 6 ++++++
 3 files changed, 9 insertions(+), 1 deletion(-)
Signature · 1 line
2.49.0.805.g082f7c87e0-goog