Messages in this thread | | | Date | Wed, 4 Nov 2015 10:11:40 -0800 | From | Davidlohr Bueso <> | Subject | Re: [PATCH v2] ipc/msg: Implement lockless pipelined wakeups |
| |
On Tue, 03 Nov 2015, Sebastian Andrzej Siewior wrote:
>In pipelined_receive() (mqueue) there is the wake_q_add() with the >implicit cmpxchg barrier. The matching barrier pairing should be in >wq_sleep() but there is none. Why is it okay to have none there and I >need one here?
So the pairing in mqueue is done in wq_sleep() as we unlock info->lock, so there's an implied barrier there.
Also, considering Peter's suggestion to wrap around READ/WRITE_ONCE for sysv queues (specially since you got rid of the volatile tag), it seems we also need them for mqueues.
Thanks, Davidlohr
| |