From: sashiko-bot@kernel.org
To: "Kunwu Chan" <kunwu.chan@gmail.com>
Cc: linux-perf-users@vger.kernel.org
Subject: Re: [RFC PATCH 2/5] perf/core: add AUX ring accessors for kernel consumers
Date: Fri, 14 Aug 2026 14:59:02 +0000 [thread overview]
Message-ID: <20260814145902.E62DC1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260814144927.489172-3-kunwu.chan@linux.dev>
> From: Kunwu Chan <kunwu.chan@gmail.com>
>
> 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) <lianux.mm@gmail.com>
> Signed-off-by: Lian Wang (Processmission) <lianux.mm@gmail.com>
> Signed-off-by: Kunwu Chan <kunwu.chan@gmail.com>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260814144927.489172-1-kunwu.chan@linux.dev?part=2
next prev parent reply other threads:[~2026-08-14 14:59 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-14 14:49 [RFC PATCH 0/5] perf/core: add AUX buffer kernel-consumer API Kunwu Chan
2026-08-14 14:49 ` [RFC PATCH 1/5] perf/core: add AUX buffer ownership for kernel events Kunwu Chan
2026-08-14 15:04 ` sashiko-bot
2026-08-14 14:49 ` [RFC PATCH 2/5] perf/core: add AUX ring accessors for kernel consumers Kunwu Chan
2026-08-14 14:59 ` sashiko-bot [this message]
2026-08-14 14:49 ` [RFC PATCH 3/5] perf/core: add KUnit tests for AUX kernel-consumer API Kunwu Chan
2026-08-14 15:02 ` sashiko-bot
2026-08-14 14:49 ` [RFC PATCH 4/5] selftests/perf_events: add userspace AUX regression test Kunwu Chan
2026-08-14 14:59 ` sashiko-bot
2026-08-14 14:49 ` [RFC PATCH 5/5] selftests/perf_events: add AUX kernel API selftest script Kunwu Chan
2026-08-14 14:56 ` sashiko-bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260814145902.E62DC1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=kunwu.chan@gmail.com \
--cc=linux-perf-users@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox