Re: [PATCH 22/27] locking/lockdep: Reuse list entries that are no longer in use

2018-12-04 Thread Bart Van Assche
On Tue, 2018-12-04 at 09:14 +0100, Peter Zijlstra wrote: > On Mon, Dec 03, 2018 at 10:16:59AM -0800, Bart Van Assche wrote: > > On Mon, 2018-12-03 at 18:32 +0100, Peter Zijlstra wrote: > > > On Mon, Dec 03, 2018 at 08:40:48AM -0800, Bart Van Assche wrote: > > > > How about the following alternative

Re: [PATCH 22/27] locking/lockdep: Reuse list entries that are no longer in use

2018-12-04 Thread Peter Zijlstra
On Mon, Dec 03, 2018 at 10:16:59AM -0800, Bart Van Assche wrote: > On Mon, 2018-12-03 at 18:32 +0100, Peter Zijlstra wrote: > > On Mon, Dec 03, 2018 at 08:40:48AM -0800, Bart Van Assche wrote: > > > > > > I think we can do this with a free bitmap and an array of 2 pending > > > > bitmaps and an in

Re: [PATCH 22/27] locking/lockdep: Reuse list entries that are no longer in use

2018-12-03 Thread Bart Van Assche
On Mon, 2018-12-03 at 18:32 +0100, Peter Zijlstra wrote: > On Mon, Dec 03, 2018 at 08:40:48AM -0800, Bart Van Assche wrote: > > > > I think we can do this with a free bitmap and an array of 2 pending > > > bitmaps and an index. Add newly freed entries to the pending bitmap > > > indicated by the c

Re: [PATCH 22/27] locking/lockdep: Reuse list entries that are no longer in use

2018-12-03 Thread Peter Zijlstra
On Mon, Dec 03, 2018 at 08:40:48AM -0800, Bart Van Assche wrote: > > I think we can do this with a free bitmap and an array of 2 pending > > bitmaps and an index. Add newly freed entries to the pending bitmap > > indicated by the current index, when complete flip the index -- such > > that further

Re: [PATCH 22/27] locking/lockdep: Reuse list entries that are no longer in use

2018-12-03 Thread Bart Van Assche
On Sat, 2018-12-01 at 21:24 +0100, Peter Zijlstra wrote: > On Thu, Nov 29, 2018 at 08:48:50AM -0800, Bart Van Assche wrote: > > On Thu, 2018-11-29 at 13:01 +0100, Peter Zijlstra wrote: > > > On Thu, Nov 29, 2018 at 11:49:02AM +0100, Peter Zijlstra wrote: > > > > On Wed, Nov 28, 2018 at 03:43:20PM -

Re: [PATCH 22/27] locking/lockdep: Reuse list entries that are no longer in use

2018-12-01 Thread Peter Zijlstra
On Thu, Nov 29, 2018 at 08:48:50AM -0800, Bart Van Assche wrote: > On Thu, 2018-11-29 at 13:01 +0100, Peter Zijlstra wrote: > > On Thu, Nov 29, 2018 at 11:49:02AM +0100, Peter Zijlstra wrote: > > > On Wed, Nov 28, 2018 at 03:43:20PM -0800, Bart Van Assche wrote: > > > > /* > > > >

Re: [PATCH 22/27] locking/lockdep: Reuse list entries that are no longer in use

2018-11-29 Thread Bart Van Assche
On Thu, 2018-11-29 at 13:01 +0100, Peter Zijlstra wrote: > On Thu, Nov 29, 2018 at 11:49:02AM +0100, Peter Zijlstra wrote: > > On Wed, Nov 28, 2018 at 03:43:20PM -0800, Bart Van Assche wrote: > > > /* > > >* Remove all dependencies this lock is > > >* involved in: > > >*/ > > > + list

Re: [PATCH 22/27] locking/lockdep: Reuse list entries that are no longer in use

2018-11-29 Thread Peter Zijlstra
On Thu, Nov 29, 2018 at 11:49:02AM +0100, Peter Zijlstra wrote: > On Wed, Nov 28, 2018 at 03:43:20PM -0800, Bart Van Assche wrote: > > Instead of abandoning elements of list_entries[] that are no longer in > > use, make alloc_list_entry() reuse array elements that have been freed. > > > diff --git

Re: [PATCH 22/27] locking/lockdep: Reuse list entries that are no longer in use

2018-11-29 Thread Peter Zijlstra
On Wed, Nov 28, 2018 at 03:43:20PM -0800, Bart Van Assche wrote: > Instead of abandoning elements of list_entries[] that are no longer in > use, make alloc_list_entry() reuse array elements that have been freed. > diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h > index 43327a1dd488.

[PATCH 22/27] locking/lockdep: Reuse list entries that are no longer in use

2018-11-28 Thread Bart Van Assche
Instead of abandoning elements of list_entries[] that are no longer in use, make alloc_list_entry() reuse array elements that have been freed. Signed-off-by: Bart Van Assche --- include/linux/lockdep.h | 5 + kernel/locking/lockdep.c | 23 --- 2 files changed, 21 insert