[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20081107174446.GF22134@Krystal>
Date: Fri, 7 Nov 2008 12:44:46 -0500
From: Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>
To: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
akpm@...ux-foundation.org, Ingo Molnar <mingo@...e.hu>,
linux-kernel@...r.kernel.org, Ralf Baechle <ralf@...ux-mips.org>
Subject: Re: [RFC patch 17/18] MIPS : Trace clock
* Peter Zijlstra (a.p.zijlstra@...llo.nl) wrote:
> 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.
>
Yep, looks good.
Mathieu
--
Mathieu Desnoyers
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists