From: Jonathan Corbet <corbet@lwn.net>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-rt-devel@lists.linux.dev
Cc: Boqun Feng <boqun.feng@gmail.com>,
Clark Williams <clrkwllms@kernel.org>,
Frederic Weisbecker <frederic@kernel.org>,
Ingo Molnar <mingo@redhat.com>,
John Ogness <john.ogness@linutronix.de>,
Peter Zijlstra <peterz@infradead.org>,
Steven Rostedt <rostedt@goodmis.org>,
Thomas Gleixner <tglx@linutronix.de>,
Valentin Schneider <vschneid@redhat.com>,
Waiman Long <longman@redhat.com>, Will Deacon <will@kernel.org>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Subject: Re: [PATCH 2/3] Documentation: locking: Add local_lock_nested_bh() to locktypes
Date: Tue, 15 Jul 2025 14:10:23 -0600 [thread overview]
Message-ID: <87zfd5dxlc.fsf@trenco.lwn.net> (raw)
In-Reply-To: <20250715144127.697787-3-bigeasy@linutronix.de>
Sebastian Andrzej Siewior <bigeasy@linutronix.de> writes:
> local_lock_nested_bh() is used within networking where applicable.
> Document why it is used and how it behaves.
>
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> ---
> Documentation/locking/locktypes.rst | 21 +++++++++++++++++++++
> 1 file changed, 21 insertions(+)
>
> diff --git a/Documentation/locking/locktypes.rst b/Documentation/locking/locktypes.rst
> index 80c914f6eae7a..4851ec1232058 100644
> --- a/Documentation/locking/locktypes.rst
> +++ b/Documentation/locking/locktypes.rst
> @@ -204,6 +204,27 @@ per-CPU data structures on a non PREEMPT_RT kernel.
> local_lock is not suitable to protect against preemption or interrupts on a
> PREEMPT_RT kernel due to the PREEMPT_RT specific spinlock_t semantics.
>
> +CPU local scope and bottom-half
> +-------------------------------
> +
> +Per-CPU variables that are accessed only in softirq context should not rely on
> +the assumption that this context is implicitly protected due to being
> +non-preemptible. In a PREEMPT_RT kernel, softirq context is preemptible, and
> +synchronizing every bottom-half-disabled section via implicit context results
> +in an implicit per-CPU "big kernel lock."
> +
> +A local_lock_t together with local_lock_nested_bh() and
> +local_unlock_nested_bh() for locking operations help to identify the locking
> +scope.
> +
> +With lockdep is enabled, these functions verify that data structure access
Did you mean *When* lockdep is enabled?
Otherwise no complaints here.
jon
next prev parent reply other threads:[~2025-07-15 20:10 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-15 14:41 [PATCH 0/3] Documentation: Add real-time bits Sebastian Andrzej Siewior
2025-07-15 14:41 ` [PATCH 1/3] Documentation: seqlock: Add a reference label and license Sebastian Andrzej Siewior
2025-07-15 14:48 ` Jonathan Corbet
2025-07-15 14:53 ` Sebastian Andrzej Siewior
2025-07-15 14:41 ` [PATCH 2/3] Documentation: locking: Add local_lock_nested_bh() to locktypes Sebastian Andrzej Siewior
2025-07-15 20:10 ` Jonathan Corbet [this message]
2025-08-14 8:40 ` Sebastian Andrzej Siewior
2025-07-15 14:41 ` [PATCH 3/3] Documentation: Add real-time Sebastian Andrzej Siewior
2025-07-15 14:50 ` Jonathan Corbet
2025-07-15 14:55 ` Sebastian Andrzej Siewior
2025-07-15 20:29 ` Jonathan Corbet
2025-08-15 9:20 ` 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=87zfd5dxlc.fsf@trenco.lwn.net \
--to=corbet@lwn.net \
--cc=bigeasy@linutronix.de \
--cc=boqun.feng@gmail.com \
--cc=clrkwllms@kernel.org \
--cc=frederic@kernel.org \
--cc=john.ogness@linutronix.de \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-devel@lists.linux.dev \
--cc=longman@redhat.com \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=vschneid@redhat.com \
--cc=will@kernel.org \
/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®