Re: [PATCH] locking/rwsem: use read_acquire in read_slowpath exit when queue is empty

2019-07-16 Thread Waiman Long
On 7/16/19 2:58 PM, Peter Zijlstra wrote: > On Tue, Jul 16, 2019 at 12:53:14PM -0400, Waiman Long wrote: >> On 7/16/19 12:04 PM, Jan Stancek wrote: > Fixes: 4b486b535c33 ("locking/rwsem: Exit read lock slowpath if queue empty & > no writer") > Signed-off-by: Jan Stancek > Cc: Waiman Long > Cc: D

Re: [PATCH] locking/rwsem: use read_acquire in read_slowpath exit when queue is empty

2019-07-16 Thread Peter Zijlstra
On Tue, Jul 16, 2019 at 12:53:14PM -0400, Waiman Long wrote: > On 7/16/19 12:04 PM, Jan Stancek wrote: > > Suspected problem here is that last *_acquire on down_read() side > > happens before write side issues *_release: > > 1. writer: has the lock > > 2. reader: down_read() issues *read_acqui

Re: [PATCH] locking/rwsem: use read_acquire in read_slowpath exit when queue is empty

2019-07-16 Thread Jan Stancek
- Original Message - > On 7/16/19 12:04 PM, Jan Stancek wrote: > > LTP mtest06 has been observed to rarely hit "still mapped when deleted" > > and following BUG_ON on arm64: > > page:7e02fa37e480 refcount:3 mapcount:1 mapping:80be3d678ab0 > > index:0x0 > > xfs_address_space

Re: [PATCH] locking/rwsem: use read_acquire in read_slowpath exit when queue is empty

2019-07-16 Thread Waiman Long
On 7/16/19 12:04 PM, Jan Stancek wrote: > LTP mtest06 has been observed to rarely hit "still mapped when deleted" > and following BUG_ON on arm64: > page:7e02fa37e480 refcount:3 mapcount:1 mapping:80be3d678ab0 > index:0x0 > xfs_address_space_operations [xfs] > flags: 0xbfffe00037

[PATCH] locking/rwsem: use read_acquire in read_slowpath exit when queue is empty

2019-07-16 Thread Jan Stancek
LTP mtest06 has been observed to rarely hit "still mapped when deleted" and following BUG_ON on arm64: page:7e02fa37e480 refcount:3 mapcount:1 mapping:80be3d678ab0 index:0x0 xfs_address_space_operations [xfs] flags: 0xbfffe00037(locked|referenced|uptodate|lru|active) page dumped