[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181129120418.GI2131@hirez.programming.kicks-ass.net>
Date: Thu, 29 Nov 2018 13:04:18 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Bart Van Assche <bvanassche@....org>
Cc: mingo@...hat.com, tj@...nel.org, johannes.berg@...el.com,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 25/27] locking/lockdep: Add support for dynamic keys
On Wed, Nov 28, 2018 at 03:43:23PM -0800, Bart Van Assche wrote:
> A shortcoming of the current lockdep implementation is that it requires
> lock keys to be allocated statically. That forces certain lock objects
> to share lock keys. Since lock dependency analysis groups lock objects
> per key sharing lock keys can cause false positive lockdep reports.
> Make it possible to avoid such false positive reports by allowing lock
> keys to be allocated dynamically. Require that dynamically allocated
> lock keys are registered before use by calling lockdep_register_key().
> Complain about attempts to register the same lock key pointer twice
> without calling lockdep_unregister_key() between successive
> registration calls.
> struct lock_class_key {
> + struct hlist_node hash_entry;
> struct lockdep_subclass_key subkeys[MAX_LOCKDEP_SUBCLASSES];
> };
That hash_entry is purely for that double-register warning, right? I
wonder if we can do that differently; by always doing
register_lock_class(), and checking that state.
Powered by blists - more mailing lists