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, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>