linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Bart Van Assche <bvanassche@acm.org>
Cc: mingo@redhat.com, linux-kernel@vger.kernel.org,
	Will Deacon <will.deacon@arm.com>, Tejun Heo <tj@kernel.org>,
	Johannes Berg <johannes.berg@intel.com>
Subject: Re: [PATCH 1/2] locking/lockdep: Add support for dynamic depmaps and keys
Date: Sat, 10 Nov 2018 14:55:24 +0100	[thread overview]
Message-ID: <20181110135524.GC3339@worktop.programming.kicks-ass.net> (raw)
In-Reply-To: <20181109234645.10530-2-bvanassche@acm.org>

On Fri, Nov 09, 2018 at 03:46:44PM -0800, Bart Van Assche wrote:
> The lock validator forces to categorize multiple instances of a lock object
> as the same lock class because it requires that struct lockdep_map and struct
> lock_class_key instances are static objects. This can result in false
> positive lockdep reports that are hard to suppress in an elegant way. Hence
> add support for allocating instances of these objects dynamically.

Yeah, I think not. You completely fail to explain how what you propose
is correct.

The thing is; we rely on static objects because they provide
persistence. Their address will never be re-used.

Dynamic objects do not provide this same guarantee. And when you re-use
the key address for something else, you'll mix the chains and things
come unstuck.


  reply	other threads:[~2018-11-10 22:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-09 23:46 [PATCH 0/2] locking/lockdep: Support dynamic lockdep keys Bart Van Assche
2018-11-09 23:46 ` [PATCH 1/2] locking/lockdep: Add support for dynamic depmaps and keys Bart Van Assche
2018-11-10 13:55   ` Peter Zijlstra [this message]
2018-11-19 21:55     ` Bart Van Assche
2018-11-09 23:46 ` [PATCH 2/2] kernel/workqueue: Use dynamic lockdep keys for workqueues Bart Van Assche

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181110135524.GC3339@worktop.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=bvanassche@acm.org \
    --cc=johannes.berg@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tj@kernel.org \
    --cc=will.deacon@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).