public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jiri Slaby <jirislaby@gmail.com>
To: Sri Ram Vemulpali <sri.ram.gmu06@gmail.com>
Cc: Kernel-newbies <kernelnewbies@nl.linux.org>,
	linux-kernel-mail <linux-kernel@vger.kernel.org>
Subject: Re: what is spinlock depth
Date: Mon, 31 Jan 2011 22:06:14 +0100	[thread overview]
Message-ID: <4D472446.2040501@gmail.com> (raw)
In-Reply-To: <AANLkTik4WQreo35jGLMQA16u+R-Ed036B3okrrx2nBGy@mail.gmail.com>

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

  reply	other threads:[~2011-01-31 21:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-31 20:27 what is spinlock depth Sri Ram Vemulpali
2011-01-31 21:06 ` Jiri Slaby [this message]
2011-02-01  5:15 ` Rajat Sharma
2011-02-01  6:40 ` WANG Cong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D472446.2040501@gmail.com \
    --to=jirislaby@gmail.com \
    --cc=kernelnewbies@nl.linux.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sri.ram.gmu06@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox