Re: locking hierarchy based on lockdep

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Jason Baron <[email protected]> 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 <[email protected]>

	Ingo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux