Re: [Xen-devel] [PATCHv4 1/3] rwlock: Add per-cpu reader-writer lock infrastructure

2015-12-18 Thread Jan Beulich
>>> On 18.12.15 at 11:06, wrote: > @@ -492,6 +494,50 @@ int _rw_is_write_locked(rwlock_t *lock) > return (lock->lock == RW_WRITE_FLAG); /* writer in critical section? */ > } > > +void _percpu_write_lock(percpu_rwlock_t **per_cpudata, > +percpu_rwlock_t *percpu_rwlock) > +{

[Xen-devel] [PATCHv4 1/3] rwlock: Add per-cpu reader-writer lock infrastructure

2015-12-18 Thread Malcolm Crossley
Per-cpu read-write locks allow for the fast path read case to have low overhead by only setting/clearing a per-cpu variable for using the read lock. The per-cpu read fast path also avoids locked compare swap operations which can be particularly slow on coherent multi-socket systems, particularly if