public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Johannes Berg <johannes@sipsolutions.net>,
	linux-pm <linux-pm@lists.osdl.org>
Subject: Re: Re: lockdep report in hibernate code
Date: Wed, 24 Oct 2007 00:18:02 +0200	[thread overview]
Message-ID: <200710240018.02655.rjw@sisk.pl> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0710231750370.21581-100000@netrider.rowland.org>

On Tuesday, 23 October 2007 23:56, Alan Stern wrote:
> On Tue, 23 Oct 2007, Rafael J. Wysocki wrote:
> 
> > > The problem here is that the buffer mutexes are not distinguishable.
> > 
> > I don't quite get the "which lock already depends on the new lock" part.
> > 
> > Well, I have always had problems with understanding what lockdep actually
> > traces ...
> 
> The basic idea is simple enough.  Lockdep looks for events which seem 
> to be problematic, such as lock A being acquired while lock B is held 
> if earlier on somebody acquired B while holding A.
> 
> The difficulty lies in the "_seem_ to be" part -- lockdep can't keep 
> track of each and every individual lock in the system.  Instead it 
> groups them into categories based on the structures they lie in.  So if 
> A and A' are both pm_mutex members but belonging to two different 
> structures, lockdep won't be able to tell them apart without help.  If 
> someone acquires A then B, and someone else acquires B then A', lockdep 
> will report a violation.

Yes, which is what I think is happening in this particular case.  More
precisely, we get pm_mutex while holding a buffer mutex, so lockdep is warning
when we get another buffer mutex afterwards.

Greetings (not sure what to do about that),
Rafael

  reply	other threads:[~2007-10-23 22:18 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-22 14:11 lockdep report in hibernate code Johannes Berg
2007-10-22 22:39 ` Rafael J. Wysocki
2007-10-23 10:34   ` Johannes Berg
2007-10-23 21:39     ` Rafael J. Wysocki
2007-10-23 21:56       ` Alan Stern
2007-10-23 22:18         ` Rafael J. Wysocki [this message]
2007-10-24  8:40           ` Johannes Berg
2007-10-24 21:57             ` Greg KH
2007-10-25 13:31               ` Johannes Berg
2007-10-25 17:13                 ` Alan Stern
2007-10-26 10:36                   ` Johannes Berg
2007-10-27 22:29                     ` Alan Stern
2007-10-28 10:38                       ` Johannes Berg

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=200710240018.02655.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=johannes@sipsolutions.net \
    --cc=linux-pm@lists.osdl.org \
    --cc=stern@rowland.harvard.edu \
    /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