lkml.org 
[lkml]   [2008]   [Nov]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC patch 17/18] MIPS : Trace clock
From
Date
On Fri, 2008-11-07 at 00:23 -0500, Mathieu Desnoyers wrote:
> Note for Peter Zijlstra :
> You should probably have a look at lockdep.c raw_spinlock_t lockdep_lock usage.
> I suspect it may be used with preemption enabled in graph_lock(). (not sure
> though, but it's worth double-checking.

Are you worried about the graph_lock() instance in
lookup_chain_cache() ?

That is the locking for validate_chain,

__lock_acquire()
validate_chain()
look_up_chain_cache()
graph_lock()
check_prevs_add()
check_prev_add()
graph_unlock()
graph_lock()
graph_unlock()

which is all done without modifying IRQ state.

However, __lock_acquire() is only called with IRQs disabled:

lock_acquire()
raw_local_irq_save()
__lock_acquire()

lock_release()
raw_local_irq_save()
__lock_release()
lock_release_nested()
__lock_acquire()
lock_release_non_nested()
__lock_acquire()

lock_set_subclass()
raw_local_irq_save()
__lock_set_subclass()
__lock_acquire()

So I think we're good.



\
 
 \ /
  Last update: 2008-11-07 12:55    [W:0.254 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site