Re: [RFC PATCH-tip v2 3/6] locking/rwsem: Enable count-based spinning on reader

2016-06-15 Thread Waiman Long
On 06/15/2016 01:38 PM, Peter Zijlstra wrote: On Tue, Jun 14, 2016 at 06:48:06PM -0400, Waiman Long wrote: static bool rwsem_optimistic_spin(struct rw_semaphore *sem) { - bool taken = false; + bool taken = false, can_spin; I would place the variables without assignment first.

Re: [RFC PATCH-tip v2 3/6] locking/rwsem: Enable count-based spinning on reader

2016-06-15 Thread Peter Zijlstra
On Tue, Jun 14, 2016 at 06:48:06PM -0400, Waiman Long wrote: > static bool rwsem_optimistic_spin(struct rw_semaphore *sem) > { > - bool taken = false; > + bool taken = false, can_spin; I would place the variables without assignment first. > + int loopcnt; > > preempt_disable