The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Vincent Donnefort <vdonnefort@google.com>
Cc: Breno Leitao <leitao@debian.org>,
	Masami Hiramatsu <mhiramat@kernel.org>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org,
	Steven Rostedt <srostedt@redhat.com>,
	kernel-team@meta.com, stable@vger.kernel.org
Subject: Re: [PATCH v2] ring-buffer: Handle a reader taking the new head in rb_handle_head_page()
Date: Thu, 12 Nov 2026 06:14:23 -0500	[thread overview]
Message-ID: <20261112061423.59e02261@fedora> (raw)
In-Reply-To: <avRuXVxVrp-Kjiqj@google.com>

On Wed, 11 Nov 2026 13:32:13 +0000
Vincent Donnefort <vdonnefort@google.com> wrote:

> Yes, now I spent more time on it, I believe it makes sense. I looked at what we
> could do and I'm trying to use a temporary RB_PAGE_HEAD | RB_PAGE_UPDATE. This
> link flag is then only converted to RB_PAGE_HEAD by the outer writer. I believe
> this would fix the race entirely... However that means the reader spins as long
> as the buffer writing is interrupted, which I admit is far from ideal.

But it is only interrupted by interrupts ;-) which should be fast.

No different than waiting for a spin lock whose owner got interrupted
by an interrupt.

-- Steve

  reply	other threads:[~2026-11-12 11:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-05 11:12 [PATCH v2] ring-buffer: Handle a reader taking the new head in rb_handle_head_page() Breno Leitao
2026-11-05 20:57 ` Steven Rostedt
2026-11-09  7:21   ` Steven Rostedt
2026-11-09  9:21   ` Vincent Donnefort
2026-11-10  7:52     ` Steven Rostedt
2026-11-11 13:32       ` Vincent Donnefort
2026-11-12 11:14         ` Steven Rostedt [this message]
2026-11-12 11:51           ` Vincent Donnefort
2026-11-09 13:10   ` Breno Leitao
2026-11-10  7:55     ` Steven Rostedt

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=20261112061423.59e02261@fedora \
    --to=rostedt@goodmis.org \
    --cc=kernel-team@meta.com \
    --cc=leitao@debian.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mhiramat@kernel.org \
    --cc=srostedt@redhat.com \
    --cc=stable@vger.kernel.org \
    --cc=vdonnefort@google.com \
    /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