[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210602103007.184993-1-leo.yan@linaro.org>
Date: Wed, 2 Jun 2021 18:29:59 +0800
From: Leo Yan <leo.yan@...aro.org>
To: Arnaldo Carvalho de Melo <acme@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Jiri Olsa <jolsa@...hat.com>,
Namhyung Kim <namhyung@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>, x86@...nel.org,
"H. Peter Anvin" <hpa@...or.com>,
Mathieu Poirier <mathieu.poirier@...aro.org>,
Suzuki K Poulose <suzuki.poulose@....com>,
Mike Leach <mike.leach@...aro.org>,
Adrian Hunter <adrian.hunter@...el.com>,
Andi Kleen <ak@...ux.intel.com>,
linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org,
coresight@...ts.linaro.org, linux-arm-kernel@...ts.infradead.org
Cc: Leo Yan <leo.yan@...aro.org>
Subject: [PATCH v2 0/8] perf: Refine barriers for AUX ring buffer
Based on the discussion [1], this patch series is to refine the memory
barriers for AUX ring buffer.
Patches 01 ~ 04 to address the barriers usage in the kernel. The first
patch is to make clear comment for how to use the barriers between the
data store and aux_head store, this asks the driver to make sure the
data is visible. Patches 02 ~ 04 is to refine the drivers for barriers
after the data store.
Patches 05 ~ 07 is to fix and clean up the memory barries in perf tool
for AUX ring buffer.
Since the 64-bit value's atomicity is not promised on 32-bit perf, the
last patch is to report error and let perf to directly exit for this
case.
Have testes the patches on Arm64 Juno platform.
[1] https://lore.kernel.org/patchwork/patch/1431867/
Leo Yan (8):
perf/ring_buffer: Add comment for barriers on AUX ring buffer
coresight: tmc-etr: Add barrier after updating AUX ring buffer
coresight: tmc-etf: Add comment for store ordering
perf/x86: Add barrier after updating bts
perf auxtrace: Change to use SMP memory barriers
perf auxtrace: Drop legacy __sync functions
perf auxtrace: Use WRITE_ONCE() for updating aux_tail
perf record: Directly bail out for compat case
arch/x86/events/intel/bts.c | 3 +++
.../hwtracing/coresight/coresight-tmc-etf.c | 6 +++++
.../hwtracing/coresight/coresight-tmc-etr.c | 8 ++++++
kernel/events/ring_buffer.c | 9 +++++++
tools/perf/builtin-record.c | 17 ++++++++++++
tools/perf/util/auxtrace.h | 27 +++----------------
6 files changed, 47 insertions(+), 23 deletions(-)
--
2.25.1
Powered by blists - more mailing lists