Re: what is spinlock depth

From: WANG Cong
Date: Tue Feb 01 2011 - 01:40:27 EST


On Mon, 31 Jan 2011 15:27:08 -0500, Sri Ram Vemulpali wrote:

> Hi all,
>
> I am reading spinlock code and looking at struct raw_spinlock. I found
> struct lockdep_map as member.
...
> Can anyone help me explain, how this struct helps the spinlock. Why do
> we need lockdepth.

Here "lockdep" is short for Lock Dependence, not Lock Depth.

We do have lock depth things, e.g. ->lock_depth of struct task_struct,
which means the nested level of BKL. But spinlock can't be nested.

--
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/