Re: Performance regression from switching lock to rw-sem for anon-vma tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]