Re: [Xen-devel] [PATCHv2 1/3] rwlock: Add per-cpu reader-writer locks

2015-11-26 Thread Jan Beulich
>>> On 20.11.15 at 17:03, wrote: > --- a/xen/common/spinlock.c > +++ b/xen/common/spinlock.c > @@ -10,6 +10,8 @@ > #include > #include > > +DEFINE_PER_CPU(cpumask_t, percpu_rwlock_readers); static (and perhaps even local to _percpu_write_lock()). > @@ -492,6 +494,42 @@ int _rw_is_write_loc

Re: [Xen-devel] [PATCHv2 1/3] rwlock: Add per-cpu reader-writer locks

2015-11-25 Thread George Dunlap
On 20/11/15 16:03, Malcolm Crossley wrote: > 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 slo

[Xen-devel] [PATCHv2 1/3] rwlock: Add per-cpu reader-writer locks

2015-11-20 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