Re: [PATCH 13/20] lockdep, mutex: Provide mutex_lock_nest_lock

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

 



On Tue, 2011-04-19 at 13:06 -0700, Andrew Morton wrote:
> On Fri, 01 Apr 2011 14:13:11 +0200
> Peter Zijlstra <a.p.zijlstra@xxxxxxxxx> wrote:
> 
> > Provide the mutex_lock_nest_lock() annotation.
> 
> why?
> 
> Neither the changelog nor the code provide any documentation for this addition to
> the lokdep API.

---
Subject: lockdep, mutex: Provide mutex_lock_nest_lock                                        
From: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>                                                
Date: Fri, 26 Nov 2010 15:39:00 +0100                                                        
                                                                                             
In order to convert i_mmap_lock to a mutex we need a mutex equivalent                        
to spin_lock_nest_lock(), thus provide the mutex_lock_nest_lock()                            
annotation.                                                                                  
                                                                                             
As with spin_lock_nest_lock(), mutex_lock_nest_lock() allows                                 
annotation of the locking pattern where an outer lock serializes the                         
acquisition order of nested locks. That is, if every time you lock                            
multiple locks A, say A1 and A2 you first acquire N, the order of                            
acquiring A1 and A2 is irrelevant.                                                           
                                                                                             
Signed-off-by: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>  
---
--
To unsubscribe from this list: send the line "unsubscribe linux-arch" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux