From: sashiko-bot@kernel.org
To: "Paul Moses" <p@1g4.org>, linux-perf-users@vger.kernel.org
Subject: Re: [PATCH 1/2] perf mmap: Use the head selected by read_init
Date: Tue, 20 Oct 2026 17:23:38 +0000 [thread overview]
Message-ID: <sashiko-outbox-179413@kernel.org> (raw)
In-Reply-To: <20261020171946.3593127-2-p@1g4.org>
> perf_mmap__push() reads the producer head before calling
> perf_mmap__read_init(), which reads it again to select the range to copy.
>
> If the producer advances between those reads, push() copies through the
> newer head but stores the earlier head in prev. The next drain starts at
> that earlier position and can write the same records to perf.data again.
>
> Use the head selected by read_init(): end for forward buffers and start
> for overwrite buffers. Save it before the copy loop advances start so
> prev matches the range that was copied.
>
> Fixes: 8872481bd048 ("perf mmap: Introduce perf_mmap__read_init()")
> Signed-off-by: Paul Moses <p@1g4.org>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261020171946.3593127-1-p@1g4.org?part=1
next prev parent reply other threads:[~2026-10-20 17:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-20 17:20 [PATCH 0/2] perf mmap: Fix replayed and skipped records Paul Moses
2026-10-20 17:20 ` [PATCH 1/2] perf mmap: Use the head selected by read_init Paul Moses
2026-10-20 17:23 ` sashiko-bot [this message]
2026-10-20 17:21 ` [PATCH 2/2] perf mmap: Preserve the consumed cursor in forward mode Paul Moses
2026-10-20 17:25 ` 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=sashiko-outbox-179413@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=p@1g4.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