From: Ingo Molnar <mingo@elte.hu>
To: Jason Baron <jbaron@redhat.com>
Cc: linux-kernel@vger.kernel.org, arjan@infradead.org, rdreier@cisco.com
Subject: Re: locking hierarchy based on lockdep
Date: Fri, 10 Nov 2006 10:27:10 +0100 [thread overview]
Message-ID: <20061110092710.GA20035@elte.hu> (raw)
In-Reply-To: <Pine.LNX.4.64.0611091354060.17915@dhcp83-20.boston.redhat.com>
* Jason Baron <jbaron@redhat.com> wrote:
> > but ... the locks_after list should really only include locks that
> > are taken immediately after. I.e. there should only be 'distance 1'
> > locks.
>
> hmmm...that's not how i read the lockdep code...and the little piece
> of code that i added to add a distance measurement to links, found
> mostly distance 1 links but there were a number of 2 and 3 links as
> well (i don't think i saw any greater than 3).
hm, indeed, the current code does this. In theory we should not need to
add every lock to every held lock's dependency, because all the
dependency-conflict discovery algorithms can walk the full graph. The
"necessary minimum" would be to only add it to the previous non-trylock
held lock's dependency list.
ok, i like your latest patch as-is - it's simpler than to complicate the
current dependency logic. the 'distance' field is only added to the list
entry structure, so while it increases that structure's size, it at
least doesnt directly increase lock sizes.
Acked-by: Ingo Molnar <mingo@elte.hu>
Ingo
next prev parent reply other threads:[~2006-11-10 9:28 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-06 18:32 locking hierarchy based on lockdep Jason Baron
2006-11-06 20:05 ` Ingo Molnar
2006-11-06 20:21 ` Roland Dreier
2006-11-06 20:22 ` Jason Baron
2006-11-06 20:37 ` Roland Dreier
2006-11-06 20:40 ` Jason Baron
2006-11-07 23:39 ` Jason Baron
2006-11-07 23:53 ` Ingo Molnar
2006-11-08 18:04 ` Jason Baron
2006-11-09 9:15 ` Ingo Molnar
2006-11-09 18:58 ` Jason Baron
2006-11-10 9:27 ` Ingo Molnar [this message]
2006-11-08 13:08 ` Pavel Machek
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=20061110092710.GA20035@elte.hu \
--to=mingo@elte.hu \
--cc=arjan@infradead.org \
--cc=jbaron@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rdreier@cisco.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