[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87zfd5dxlc.fsf@trenco.lwn.net>
Date: Tue, 15 Jul 2025 14:10:23 -0600
From: Jonathan Corbet <corbet@....net>
To: Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-rt-devel@...ts.linux.dev
Cc: Boqun Feng <boqun.feng@...il.com>, Clark Williams
<clrkwllms@...nel.org>, Frederic Weisbecker <frederic@...nel.org>, Ingo
Molnar <mingo@...hat.com>, John Ogness <john.ogness@...utronix.de>, Peter
Zijlstra <peterz@...radead.org>, Steven Rostedt <rostedt@...dmis.org>,
Thomas Gleixner <tglx@...utronix.de>, Valentin Schneider
<vschneid@...hat.com>, Waiman Long <longman@...hat.com>, Will Deacon
<will@...nel.org>, Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Subject: Re: [PATCH 2/3] Documentation: locking: Add local_lock_nested_bh()
to locktypes
Sebastian Andrzej Siewior <bigeasy@...utronix.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@...utronix.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
Powered by blists - more mailing lists