From: Steven Rostedt <rostedt@goodmis.org>
To: "Masami Hiramatsu (Google)" <mhiramat@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org,
Mark Rutland <mark.rutland@arm.com>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Andrew Morton <akpm@linux-foundation.org>,
Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [PATCH 1/2] ring-buffer: Replace rb_time_cmpxchg() with rb_time_cmp_and_update()
Date: Mon, 18 Dec 2023 13:42:40 -0500 [thread overview]
Message-ID: <20231218134240.4ed0ecbd@gandalf.local.home> (raw)
In-Reply-To: <20231218101531.63d138df@gandalf.local.home>
On Mon, 18 Dec 2023 10:15:31 -0500
Steven Rostedt <rostedt@goodmis.org> wrote:
> Basically I broke it into:
>
> 1. Remove workaround exposure from the main logic. (this patch)
> 2. Remove the workaround. (next patch).
>
> >
> > Isn't this part actual change?
>
> This part is abstracted out from the main logic. Which is why I made this
> patch.
>
> >
> > > static bool rb_time_cmp_and_update(rb_time_t *t, u64 expect, u64 set)
> > > {
> > > - return rb_time_cmpxchg(t, expect, set);
> > > +#ifdef RB_TIME_32
> > > + return expect == READ_ONCE(t->time);
>
> And I need to make a v2 as the above is wrong. It should have been:
>
> return expect == local64_read(&t->time);
My v2 version will also make 64 bit not guaranteed to update on return of
true. Which adds even more reason to separate out the two.
-- Steve
next prev parent reply other threads:[~2023-12-18 18:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-15 16:55 [PATCH 0/2] tracing: Replace final 64-bit cmpxchg with compare and update if available Steven Rostedt
2023-12-15 16:55 ` [PATCH 1/2] ring-buffer: Replace rb_time_cmpxchg() with rb_time_cmp_and_update() Steven Rostedt
2023-12-18 14:24 ` Masami Hiramatsu
2023-12-18 15:15 ` Steven Rostedt
2023-12-18 18:42 ` Steven Rostedt [this message]
2023-12-18 22:52 ` Steven Rostedt
2023-12-15 16:55 ` [PATCH 2/2] ring-buffer: Remove 32bit timestamp logic 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=20231218134240.4ed0ecbd@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.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 \
--cc=torvalds@linux-foundation.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