[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20061110092710.GA20035@elte.hu>
Date: Fri, 10 Nov 2006 10:27:10 +0100
From: Ingo Molnar <mingo@...e.hu>
To: Jason Baron <jbaron@...hat.com>
Cc: linux-kernel@...r.kernel.org, arjan@...radead.org,
rdreier@...co.com
Subject: Re: locking hierarchy based on lockdep
* Jason Baron <jbaron@...hat.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@...e.hu>
Ingo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists