Re: [PATCH v3] perf doc: Document ring buffer mechanism
From: Ingo Molnar
Date: Tue Oct 03 2023 - 05:48:05 EST
* Ingo Molnar <mingo@xxxxxxxxxx> wrote:
>
> * Leo Yan <leo.yan@xxxxxxxxxx> wrote:
>
> > In the Linux perf tool, the ring buffer serves not only as a medium for
> > transferring PMU event data but also as a vital mechanism for hardware
> > tracing using technologies like Intel PT and Arm CoreSight, etc.
> >
> > Consequently, the ring buffer mechanism plays a crucial role by ensuring
> > high throughput for data transfer between the kernel and user space
> > while avoiding excessive overhead caused by the ring buffer itself.
> >
> > This commit documents the ring buffer mechanism in detail. It provides
> > an in-depth explanation of the implementation of both the generic ring
> > buffer and the AUX ring buffer. Additionally, it covers how these ring
> > buffers support various tracing modes and explains the synchronization
> > with memory barriers.
> >
> > Signed-off-by: Leo Yan <leo.yan@xxxxxxxxxx>
> > ---
> >
> > Changes from v2:
> > - Refined doc for Thomas's suggestions (Thomas Richter).
> >
> > Changes from v1:
> > - Addressed Ian's comments and suggestions (Ian Rogers).
> >
> >
> > tools/perf/Documentation/perf-ring-buffer.txt | 762 ++++++++++++++++++
> > 1 file changed, 762 insertions(+)
> > create mode 100644 tools/perf/Documentation/perf-ring-buffer.txt
>
> Nice addition!
>
> If it hasn't been picked up yet:
>
> Acked-by: Ingo Molnar <mingo@xxxxxxxxxx>
Note that my ack is conditional on the conversion to RST and moving to
Documentation/ - this documents an important aspect of the primary perf
ABI, it deserves to be on the kernel side.
Thanks,
Ingo