Re: what is spinlock depth
From: Jiri Slaby
Date: Mon Jan 31 2011 - 16:06:23 EST
On 01/31/2011 09:27 PM, Sri Ram Vemulpali wrote:
> Hi all,
>
> I am reading spinlock code and looking at struct raw_spinlock. I found
> struct lockdep_map as member.
> which is defined as
>
> struct lockdep_map {
> struct lock_class_key *key;
> struct lock_class *class_cache[NR_LOCKDEP_CACHING_CLASSES];
> const char *name;
> #ifdef CONFIG_LOCK_STAT
> int cpu;
> unsigned long ip;
> #endif
> };
>
> Can anyone help me explain, how this struct helps the spinlock. Why do
> we need lockdepth.
It's not dep-th, but dep-endency. It's a debugging technique to
dynamically check for locking correctness. See more details in
Documentation/lockdep-design.txt.
--
js
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/