Re: [PATCH v3] futex: replace bare barrier() with more lightweight READ_ONCE()

2016-03-08 Thread Darren Hart
On Mon, Mar 07, 2016 at 09:32:24AM +0800, Jianyu Zhan wrote: > Commit e91467ecd1ef ("bug in futex unqueue_me") introduces a barrier() > in unqueue_me(), to address below problem. > > The scenario is like this: > > > original code: > > retry: >lock_ptr = q->lock_ptr;

[PATCH v3] futex: replace bare barrier() with more lightweight READ_ONCE()

2016-03-06 Thread Jianyu Zhan
Commit e91467ecd1ef ("bug in futex unqueue_me") introduces a barrier() in unqueue_me(), to address below problem. The scenario is like this: original code: retry: lock_ptr = q->lock_ptr; if (lock_ptr != 0) { spin_lock(lock_ptr)