From: Matthew Wilcox <willy@infradead.org>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: linux-kernel@vger.kernel.org, Boqun Feng <boqun.feng@gmail.com>,
Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Thomas Gleixner <tglx@linutronix.de>,
Waiman Long <longman@redhat.com>, Will Deacon <will@kernel.org>,
Clark Williams <williams@redhat.com>
Subject: Re: [PATCH] Locking: Let PREEMPT_RT compile again with new rwsem asserts.
Date: Tue, 19 Mar 2024 16:01:26 +0000 [thread overview]
Message-ID: <Zfm21jBMZIci3P6P@casper.infradead.org> (raw)
In-Reply-To: <20240319141506.DUd9NKl4@linutronix.de>
On Tue, Mar 19, 2024 at 03:15:06PM +0100, Sebastian Andrzej Siewior wrote:
> On 2024-03-19 13:38:06 [+0000], Matthew Wilcox wrote:
> > On Tue, Mar 19, 2024 at 08:05:50AM +0100, Sebastian Andrzej Siewior wrote:
> > > -static inline void rwsem_assert_held_write_nolockdep(const struct rw_semaphore *sem)
> > > +static __always_inline bool rwsem_held_write(const struct rw_semaphore *sem)
> >
> > The locking maintainers were very clear that this predicate Should Not
> > Exist. It encourages people to write bad code. Assertions only!
>
> What do you refer to? The inline vs __always_inline or
> rwsem_held_write() should not exists and it should invoke directly
> rw_base_is_write_locked()?
I see Waiman already gave you the substantial answer ... but why did you
change inline to __always_inline?
next prev parent reply other threads:[~2024-03-19 16:01 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-19 7:05 Sebastian Andrzej Siewior
2024-03-19 13:38 ` Matthew Wilcox
2024-03-19 14:15 ` Sebastian Andrzej Siewior
2024-03-19 15:53 ` Waiman Long
2024-03-19 18:20 ` [PATCH v2] " Sebastian Andrzej Siewior
2024-03-20 0:58 ` Waiman Long
2024-04-08 14:49 ` [tip: locking/urgent] locking: Make rwsem_assert_held_write_nolockdep() build with PREEMPT_RT=y tip-bot2 for Sebastian Andrzej Siewior
2024-03-19 16:01 ` Matthew Wilcox [this message]
2024-03-19 18:21 ` [PATCH] Locking: Let PREEMPT_RT compile again with new rwsem asserts Sebastian Andrzej Siewior
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=Zfm21jBMZIci3P6P@casper.infradead.org \
--to=willy@infradead.org \
--cc=bigeasy@linutronix.de \
--cc=boqun.feng@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=longman@redhat.com \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=will@kernel.org \
--cc=williams@redhat.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
all inboxes | Powered by JetHome®