lkml.org 
[lkml]   [2015]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2] ipc/mqueue: remove STATE_PENDING
From
Date
On Tue, 2015-04-28 at 18:43 +0200, Peter Zijlstra wrote:
> Well, if you can 'guarantee' the cmpxchg will not fail, you can then
> rely on the fact that cmpxchg implies a full barrier, which would
> obviate the need for the wmb.

Yes, assuming it implies barriers on both sides. And we could obviously
remove the need for pairing. With wake_q being local to wq_sleep() I
cannot see duplicate tasks trying to add themselves in the list. Failed
cmpxchg should only occur when users start misusing the wake_q.

Manfred, do you have any objections to this? Perhaps I've missed the
real purpose of the barriers.

Thanks,
Davidlohr




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