lkml.org 
[lkml]   [2015]   [Nov]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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


\
 
 \ /
  Last update: 2015-11-04 19:21    [W:0.035 / U:0.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site