mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Dmitry Torokhov" <dmitry.torokhov@gmail.com>
To: "Jiri Kosina" <jikos@jikos.cz>
Cc: lkml <linux-kernel@vger.kernel.org>,
	"Arjan van de Ven" <arjan@infradead.org>,
	"Ingo Molnar" <mingo@elte.hu>
Subject: Re: [PATCH 0/3] Synaptics - fix lockdep warnings
Date: Thu, 14 Sep 2006 14:56:09 -0400	[thread overview]
Message-ID: <d120d5000609141156h5e06eb68k87a6fe072a701dab@mail.gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0609142037110.2721@twin.jikos.cz>

On 9/14/06, Jiri Kosina <jikos@jikos.cz> wrote:
> On Thu, 14 Sep 2006, Dmitry Torokhov wrote:
>
> > Well, we do not really care about nestiness do we? What we trying to
> > achieve is to teach lockdep that 2 locks while appear as the lame lock
> > in fact are different and protect 2 different structures. Ideally
> > lockdep should track every lock individually (based for example on its
> > address) but that would be too taxing so we need to help it. In your
> > implementation you embed this data into structure/code using lock, but
> > this information could be instilled into the lock itself upon
> > initialization and spin_[un]lock() implementation could be taught to use
> > this data thus making specialized spin_[un]lock*_nested() functions
> > unnecessary.
>
> Hi Dmitry,
>
> IMHO this is exactly what the nested locking primitives were introduced in
> lockdep for (we even have natural hierarchy here), so I am not sure if
> this is compliant with lockdep design. I definitely could do a patch that
> would introduce {spin,mutex..}_lock_init_subclass(), which would
> initialize the lock together with defining it's 'class', so that it could
> be distinguishable from any other lock of the same type during proving of
> correctness ... but this is a step towards distinguishing every single
> lock from all others (even of a same type), which I am not sure is the
> right direction.
>

I think it is - as far as I understand the reason for not tracking
every lock individually is just that it is too expensive to do by
default.

-- 
Dmitry

  reply	other threads:[~2006-09-14 18:56 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-14  0:44 Jiri Kosina
2006-09-14  0:44 ` [PATCH 1/3] " Jiri Kosina
2006-09-14  0:44   ` [PATCH 2/3] " Jiri Kosina
2006-09-14  0:44     ` [PATCH 3/3] " Jiri Kosina
2006-09-14  2:00 ` [PATCH 0/3] " Dmitry Torokhov
2006-09-14  8:43   ` Jiri Kosina
2006-09-14 13:18     ` Dmitry Torokhov
2006-09-14 14:39       ` Jiri Kosina
2006-09-14 14:58         ` Dmitry Torokhov
2006-09-14 15:03           ` Arjan van de Ven
2006-09-14 15:08           ` Jiri Kosina
2006-09-14 15:51             ` Dmitry Torokhov
2006-09-14 16:00               ` Jiri Kosina
2006-09-14 16:18                 ` Dmitry Torokhov
2006-09-14 18:48                   ` Jiri Kosina
2006-09-14 18:56                     ` Dmitry Torokhov [this message]
2006-09-14 19:03                       ` Arjan van de Ven
2006-09-14 19:11                         ` Dmitry Torokhov
2006-09-15  5:33                           ` Arjan van de Ven
2006-09-15 13:20                             ` Dmitry Torokhov
2006-09-15 13:38                               ` Jiri Kosina
2006-09-15 13:51                                 ` Dmitry Torokhov
2006-09-15 13:56                                   ` Dmitry Torokhov
2006-09-14 19:56                       ` Ingo Molnar

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=d120d5000609141156h5e06eb68k87a6fe072a701dab@mail.gmail.com \
    --to=dmitry.torokhov@gmail.com \
    --cc=arjan@infradead.org \
    --cc=jikos@jikos.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /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

all inboxes | Powered by JetHome®