Re: [Linux-v4.6-rc1] ext4: WARNING: CPU: 2 PID: 2692 at kernel/locking/lockdep.c:2017 __lock_acquire+0x180e/0x2260

Peter Zijlstra
2016-03-30T13:15:28Z

On Wed, Mar 30, 2016 at 02:46:36PM +0200, Sedat Dilek wrote:
> dependency chain hlocks: 49608 [max: 327680]

OK, so that is still below the u16 limit, so you're seeing an actual
hash collision and my patch will not cure that.

A different hash function _might_ help, but eventually this is an
unfixable problem. Our input space is (2^13)^48 = 2^(13*48) = 2^624 =
ff'n huge, reducing that to 2^64 is bound to generate a collision at some
point.

[ technically the 48 held_lock spots are not fully independent, so
(2^13)^48 is slightly overestimating it, but the numbers are big
enough for this to not matter much. ]