From: Steven Rostedt <rostedt@goodmis.org>
To: LKML <linux-kernel@vger.kernel.org>,
Linux Trace Kernel <linux-trace-kernel@vger.kernel.org>
Cc: Masami Hiramatsu <mhiramat@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Subject: Re: [PATCH v2] ring-buffer: Simplify reservation with try_cmpxchg() loop
Date: Mon, 19 Feb 2024 18:03:47 -0500 [thread overview]
Message-ID: <20240219180347.115e04f4@gandalf.local.home> (raw)
In-Reply-To: <20240219173003.08339d54@gandalf.local.home>
On Mon, 19 Feb 2024 17:30:03 -0500
Steven Rostedt <rostedt@goodmis.org> wrote:
> - /*C*/ write = local_add_return(info->length, &tail_page->write);
> + /*C*/ if (!local_try_cmpxchg(&tail_page->write, &w, w + info->length)) {
> + if (info.add_timestamp & (RB_ADD_STAMP_FORCE | RB_ADD_STAMP_EXTEND))
> + info.length -= RB_LEN_TIME_EXTEND;
> + goto again;
> + }
Bah, I had my ktest config testing a different tree and this wasn't what I
was testing :-p
The above needs to be:
if (info->add_timestamp & (RB_ADD_STAMP_FORCE | RB_ADD_STAMP_EXTEND))
info->length -= RB_LEN_TIME_EXTEND;
Will send out a v3.
-- Steve
prev parent reply other threads:[~2024-02-19 23:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-19 22:30 [PATCH v2] ring-buffer: Simplify reservation with try_cmpxchg() loop Steven Rostedt
2024-02-19 23:03 ` Steven Rostedt [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=20240219180347.115e04f4@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@kernel.org \
/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