From: Peter Zijlstra <peterz@infradead.org>
To: Eric Dumazet <edumazet@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
linux-kernel <linux-kernel@vger.kernel.org>,
Eric Dumazet <eric.dumazet@gmail.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
netdev@vger.kernel.org,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
Marco Elver <elver@google.com>
Subject: Re: [PATCH] locking/local_lock: Reduce local_[un]lock_nested_bh() overhead
Date: Mon, 9 Mar 2026 14:43:55 +0100 [thread overview]
Message-ID: <20260309134355.GC606826@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <20260309122055.1226507-1-edumazet@google.com>
On Mon, Mar 09, 2026 at 12:20:55PM +0000, Eric Dumazet wrote:
> diff --git a/include/linux/local_lock.h b/include/linux/local_lock.h
> index b8830148a8591c17c22e36470fbc13ff5c354955..40c2da54a0b720265be7b6327e0922a49befd8fc 100644
> --- a/include/linux/local_lock.h
> +++ b/include/linux/local_lock.h
> @@ -94,12 +94,19 @@ DEFINE_LOCK_GUARD_1(local_lock_irqsave, local_lock_t __percpu,
> local_unlock_irqrestore(_T->lock, _T->flags),
> unsigned long flags)
>
> +#if defined(WARN_CONTEXT_ANALYSIS) || defined(CONFIG_PREEMPT_RT) || \
> + defined(CONFIG_DEBUG_LOCK_ALLOC)
> #define local_lock_nested_bh(_lock) \
> __local_lock_nested_bh(__this_cpu_local_lock(_lock))
>
> #define local_unlock_nested_bh(_lock) \
> __local_unlock_nested_bh(__this_cpu_local_lock(_lock))
>
> +#else
> +static inline void local_lock_nested_bh(local_lock_t *_lock) {}
> +static inline void local_unlock_nested_bh(local_lock_t *__lock) {}
> +#endif
This isn't going to work; WARN_CONTEXT_ANALYSIS is unconditional on
clang >= 22.1
How come that this isn't DCEd properly?
next prev parent reply other threads:[~2026-03-09 13:44 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-09 12:20 [PATCH] locking/local_lock: Reduce local_[un]lock_nested_bh() overhead Eric Dumazet
2026-03-09 13:43 ` Peter Zijlstra [this message]
2026-03-09 13:49 ` Eric Dumazet
2026-03-09 14:05 ` Marco Elver
2026-03-09 14:11 ` Eric Dumazet
2026-03-09 14:03 ` Eric Dumazet
2026-03-09 14:18 ` Eric Dumazet
2026-03-09 14:52 ` Eric Dumazet
2026-03-11 15:55 ` Sebastian Andrzej Siewior
2026-03-11 16:32 ` Uros Bizjak
2026-03-11 16:45 ` Uros Bizjak
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=20260309134355.GC606826@noisy.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=bigeasy@linutronix.de \
--cc=edumazet@google.com \
--cc=elver@google.com \
--cc=eric.dumazet@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=tglx@linutronix.de \
/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