[PATCH v6 07/46] percpu_rwlock: Allow writers to be readers, and add lockdep annotations

2013-02-18 Thread Srivatsa S. Bhat
CPU hotplug (which will be the first user of per-CPU rwlocks) has a special requirement with respect to locking: the writer, after acquiring the per-CPU rwlock for write, must be allowed to take the same lock for read, without deadlocking and without getting complaints from lockdep. In comparison,

Re: [PATCH v6 07/46] percpu_rwlock: Allow writers to be readers, and add lockdep annotations

2013-02-18 Thread Michel Lespinasse
On Mon, Feb 18, 2013 at 8:39 PM, Srivatsa S. Bhat srivatsa.b...@linux.vnet.ibm.com wrote: @@ -200,6 +217,16 @@ void percpu_write_lock_irqsave(struct percpu_rwlock *pcpu_rwlock, smp_mb(); /* Complete the wait-for-readers, before taking the lock */

Re: [PATCH v6 07/46] percpu_rwlock: Allow writers to be readers, and add lockdep annotations

2013-02-18 Thread Srivatsa S. Bhat
On 02/18/2013 09:21 PM, Michel Lespinasse wrote: On Mon, Feb 18, 2013 at 8:39 PM, Srivatsa S. Bhat srivatsa.b...@linux.vnet.ibm.com wrote: @@ -200,6 +217,16 @@ void percpu_write_lock_irqsave(struct percpu_rwlock *pcpu_rwlock, smp_mb(); /* Complete the wait-for-readers, before taking