[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20240219180347.115e04f4@gandalf.local.home>
Date: Mon, 19 Feb 2024 18:03:47 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: LKML <linux-kernel@...r.kernel.org>, Linux Trace Kernel
<linux-trace-kernel@...r.kernel.org>
Cc: Masami Hiramatsu <mhiramat@...nel.org>, Mark Rutland
<mark.rutland@....com>, Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
Subject: Re: [PATCH v2] ring-buffer: Simplify reservation with try_cmpxchg()
loop
On Mon, 19 Feb 2024 17:30:03 -0500
Steven Rostedt <rostedt@...dmis.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
Powered by blists - more mailing lists