From: sashiko-bot@kernel.org
To: "Paul Moses" <p@1g4.org>, linux-perf-users@vger.kernel.org
Subject: Re: [PATCH 2/2] perf mmap: Preserve the consumed cursor in forward mode
Date: Tue, 20 Oct 2026 17:25:36 +0000 [thread overview]
Message-ID: <sashiko-outbox-179419@kernel.org> (raw)
In-Reply-To: <20261020171946.3593127-3-p@1g4.org>
> perf_mmap__read_event() updates prev as it consumes forward-buffer
> records. perf_mmap__read_done() then overwrites prev with a fresh
> producer head, even when unread records remain.
>
> perf_kvm__mmap_read_idx() stops after 25 records per mmap and calls
> read_done(). If more records are pending, prev advances past them. The
> next drain starts at that new position and skips the unread remainder.
>
> An event arriving after the last empty read_event() and before
> read_done() can also be skipped. read_done() does not itself update the
> kernel's data_tail.
>
> Only refresh prev for overwrite buffers, which need the current head as
> the end of the next backward read. Leave the forward cursor at the
> consumed position.
>
> Fixes: 53172f9057e9 ("perf kvm: Switch to new perf_mmap__read_event() interface")
> 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=2
prev parent reply other threads:[~2026-10-20 17:25 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
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 [this message]
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-179419@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