Re: [RFC tip/locking/lockdep v5 15/17] lockdep: Reduce the size of lock_list

2018-02-23 Thread Boqun Feng
On Fri, Feb 23, 2018 at 12:38:43PM +0100, Peter Zijlstra wrote: > On Thu, Feb 22, 2018 at 03:09:02PM +0800, Boqun Feng wrote: > > diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h > > index a1f91f8680bd..3fce8dbf5091 100644 > > --- a/include/linux/lockdep.h > > +++ b/include/linux/lock

Re: [RFC tip/locking/lockdep v5 15/17] lockdep: Reduce the size of lock_list

2018-02-23 Thread Peter Zijlstra
On Thu, Feb 22, 2018 at 03:09:02PM +0800, Boqun Feng wrote: > diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h > index a1f91f8680bd..3fce8dbf5091 100644 > --- a/include/linux/lockdep.h > +++ b/include/linux/lockdep.h > @@ -186,11 +186,11 @@ struct lock_list { > struct list_head

[RFC tip/locking/lockdep v5 15/17] lockdep: Reduce the size of lock_list

2018-02-21 Thread Boqun Feng
We actually only need 4 bits for lock_list::dep and 1 bit for lock_list::is_rr, besides lock_list::distance should always be no greater than MAX_LOCKDEP_DEPTH(which is 48 right now), so a u16 will fit, this patch then reduces the sizes of those fields to save space for lock_list structure, as a res