On 06/18/2013 02:45 AM, Tim Chen wrote: >>> + if (unlikely(sem->count < RWSEM_WAITING_BIAS)) { >>> > > + cpu_relax(); >>> > > + continue; >>> > > + } > The above two if statements could be cleaned up as a single check: > > if (unlikely(sem->count < RWSEM_WAITING_BIAS)) > return sem; > > This one statement is sufficient to check that we don't have a writer > stolen the lock before we attempt to acquire the read lock by modifying > sem->count. > >
Thanks. I will send out the patchset base your suggestion. -- Thanks Alex -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/