From: Kent Overstreet <kent.overstreet@linux.dev>
To: linux-kernel@vger.kernel.org, peterz@infradead.org
Cc: Kent Overstreet <kent.overstreet@linux.dev>,
mingo@redhat.com, stern@rowland.harvard.edu
Subject: [PATCH 0/2] lockdep lock comparison function
Date: Fri, 17 Feb 2023 22:21:15 -0500 [thread overview]
Message-ID: <20230218032117.2372071-1-kent.overstreet@linux.dev> (raw)
This patch implements the lock comparison function I've been talking
about, and converts one of bcache's locks to use it.
b->write_lock has different locking rules; I'm not sure there's an easy
way to get rid of lockdep_set_novalidate_class for it - but the code has
changed and my memory is foggy.
I'd like it if we could convert existing uses of *_lock_nested() to this
approach, since it's more rigorous and IMO, much clearer. That'll
require looking at specific use cases, though - the inode lock in
fs/inode.c is the only one I looked at and it's got a lot of nutty stuff
going on.
Kent Overstreet (2):
lockdep: lock_set_lock_cmp_fn()
bcache: Convert to lock_cmp_fn
drivers/md/bcache/btree.c | 15 ++++++++++-
drivers/md/bcache/btree.h | 4 +--
include/linux/lockdep.h | 8 ++++++
include/linux/lockdep_types.h | 6 +++++
kernel/locking/lockdep.c | 51 ++++++++++++++++++++++++++++++++++-
5 files changed, 80 insertions(+), 4 deletions(-)
--
2.39.2
next reply other threads:[~2023-02-18 3:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-18 3:21 Kent Overstreet [this message]
2023-02-18 3:21 ` [PATCH 1/2] lockdep: lock_set_lock_cmp_fn() Kent Overstreet
2023-02-20 15:09 ` Peter Zijlstra
2023-02-20 22:45 ` Kent Overstreet
2023-02-20 23:51 ` Kent Overstreet
2023-02-23 13:01 ` Peter Zijlstra
2023-02-23 19:27 ` Kent Overstreet
2023-02-18 3:21 ` [PATCH 2/2] bcache: Convert to lock_cmp_fn Kent Overstreet
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=20230218032117.2372071-1-kent.overstreet@linux.dev \
--to=kent.overstreet@linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=stern@rowland.harvard.edu \
/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