Re: [PATCH 20/27] locking/lockdep: Free lock classes that are no longer in use

2018-11-29 Thread Peter Zijlstra
On Wed, Nov 28, 2018 at 03:43:18PM -0800, Bart Van Assche wrote: > +/* Must be called with the graph lock held. */ > +static void remove_class_from_lock_chain(struct lock_chain *chain, > + struct lock_class *class) > +{ > + u64 chain_key; > + int i; > +

[PATCH 20/27] locking/lockdep: Free lock classes that are no longer in use

2018-11-28 Thread Bart Van Assche
Instead of leaving lock classes that are no longer in use in the lock_classes array, reuse entries from that array that are no longer in use. Maintain a linked list of free lock classes with list head 'free_lock_class'. Initialize that list from inside register_lock_class() instead of from inside l