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

2016-01-21 Thread Ian Campbell
On Fri, 2015-12-18 at 16:08 +, Malcolm Crossley wrote: > diff --git a/xen/include/asm-arm/percpu.h b/xen/include/asm-arm/percpu.h > index 71e7649..c308a56 100644 > --- a/xen/include/asm-arm/percpu.h > +++ b/xen/include/asm-arm/percpu.h > @@ -27,6 +27,11 @@ void percpu_init_areas(void); >  #defi

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

2016-01-20 Thread George Dunlap
On Mon, Jan 11, 2016 at 3:06 PM, Malcolm Crossley wrote: > On 22/12/15 11:56, George Dunlap wrote: >> On 18/12/15 16:08, Malcolm Crossley wrote: >>> >>> + >>> +#ifndef NDEBUG >>> +#define PERCPU_RW_LOCK_UNLOCKED(owner) { RW_LOCK_UNLOCKED, 0, owner } >>> +static inline void _percpu_rwlock_owner_ch

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

2016-01-19 Thread George Dunlap
On 19/01/16 10:29, Malcolm Crossley wrote: > On 11/01/16 15:06, Malcolm Crossley wrote: >> On 22/12/15 11:56, George Dunlap wrote: >>> On 18/12/15 16:08, Malcolm Crossley wrote: + +#ifndef NDEBUG +#define PERCPU_RW_LOCK_UNLOCKED(owner) { RW_LOCK_UNLOCKED, 0, owner } +stati

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

2016-01-19 Thread Malcolm Crossley
On 11/01/16 15:06, Malcolm Crossley wrote: > On 22/12/15 11:56, George Dunlap wrote: >> On 18/12/15 16:08, Malcolm Crossley wrote: >>> >>> + >>> +#ifndef NDEBUG >>> +#define PERCPU_RW_LOCK_UNLOCKED(owner) { RW_LOCK_UNLOCKED, 0, owner } >>> +static inline void _percpu_rwlock_owner_check(percpu_rwlo

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

2016-01-11 Thread Malcolm Crossley
On 22/12/15 11:56, George Dunlap wrote: > On 18/12/15 16:08, Malcolm Crossley wrote: >> >> + >> +#ifndef NDEBUG >> +#define PERCPU_RW_LOCK_UNLOCKED(owner) { RW_LOCK_UNLOCKED, 0, owner } >> +static inline void _percpu_rwlock_owner_check(percpu_rwlock_t **per_cpudata, >> +

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

2015-12-22 Thread George Dunlap
On 18/12/15 16:08, 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

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

2015-12-18 Thread Jan Beulich
>>> On 18.12.15 at 17:08, 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 slow on cohe

[Xen-devel] [PATCHv5 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