Thread (17 messages) 17 messages, 8 authors, 2021-08-09

Re: [RFC PATCH v1 1/5] locking/atomic: Implement atomic_fetch_and_or

From: hev <hidden>
Date: 2021-07-29 08:37:22

Hi, Peter,

On Thu, Jul 29, 2021 at 4:24 PM Peter Zijlstra [off-list ref] wrote:
On Thu, Jul 29, 2021 at 09:58:02AM +0800, hev wrote:
quoted
Hi, Peter,

On Wed, Jul 28, 2021 at 9:21 PM Peter Zijlstra [off-list ref] wrote:
quoted
On Wed, Jul 28, 2021 at 03:16:54PM +0200, Peter Zijlstra wrote:
quoted
On Wed, Jul 28, 2021 at 02:58:35PM +0200, Peter Zijlstra wrote:
quoted
The below isn't quite right, because it'll use try_cmpxchg() for
atomic_andnot_or(), which by being a void atomic should be _relaxed. I'm
not entirely sure how to make that happen in a hurry.

---
This seems to do the trick.
Mark suggested this, which is probably nicer still.
Wow, Amazing! so the architecture dependent can be implemented one by one.
Nah, this is just the fallback, you still need individual arch code to
optimize this and get proper LL/SC primitives.
Okay, already started. If the atomic andnot_or seems to be ok, I will
send the rest of the patches.

Regards
Rui
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help