Messages in this thread | | | From | Uros Bizjak <> | Date | Wed, 1 Mar 2023 19:37:06 +0100 | Subject | Re: [PATCH 3/3] ring_buffer: Use try_cmpxchg instead of cmpxchg |
| |
On Wed, Mar 1, 2023 at 7:28 PM Steven Rostedt <rostedt@goodmis.org> wrote: > > On Wed, 1 Mar 2023 13:18:31 -0500 > Steven Rostedt <rostedt@goodmis.org> wrote: > > > I am leaning to just taking this, and hope that it doesn't cause problems. > > And I would really love to change all the local_cmpxchg() to > > local_try_cmpxchg(). Hmm, I wonder how much of an effort that would be to > > implement those? > > I see that you were the one that added the generic support for > try_cmpxchg64() and messed with all those generated files. Care to add one > for local_try_cmpxchg() ;-)
I already have a half-written patch that implements local_try_cmpxchg. Half-written in the sense that above-mentioned scripts generate correct locking primitives, but the fallback code for local_cmpxchg is a bit different that the fallback code for cmpxchg. There is an effort to unify all cmpxchg stuff (cmpxchg128 will be introduced) and I think that local_cmpxchg should also be handled in the same way. So, if there is interest, I can find some time to finish the infrastructure patch and convert the uses. But this is quite an undertaking that will take some time.
Uros.
| |