Re: [RFC PATCH 2/5] perf/core: add AUX ring accessors for kernel consumers
| Newsgroups | org.kernel.vger.linux-perf-users |
|---|---|
| Message-ID | <[email protected]> |
> From: Kunwu Chan <[email protected]> > > Add kernel-consumer accessors for the published AUX producer head, the > consumer tail, and copying a possibly wrapped AUX interval without exposing > perf's internal page array. > > Use the same memory ordering as mmap consumers: order data reads after the > published head with smp_rmb() and order completed data reads before > advancing the tail with smp_mb(). Validate cursor distances in the > absolute cursor domain before applying the ring mask, so rewound, > already-consumed, and future windows are rejected even across unsigned > cursor wrap. > > Hold an AUX reference while copying so storage cannot disappear under the > consumer. Restrict the helpers to buffers owned by the kernel AUX setup > API. Document the API in > Documentation/userspace-api/perf_ring_buffer.rst (§3.4). > > Co-developed-by: Lian Wang (Processmission) <[email protected]> > Signed-off-by: Lian Wang (Processmission) <[email protected]> > Signed-off-by: Kunwu Chan <[email protected]> Sashiko has reviewed this patch and found no issues. It looks great! -- Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=2