BPF List
 help / color / mirror / Atom feed
From: "Alexei Starovoitov" <alexei.starovoitov@gmail.com>
To: "Herbert Xu" <herbert@gondor.apana.org.au>, <mt4022@columbia.edu>
Cc: "Daniel Borkmann" <daniel@iogearbox.net>,
	"Andrii Nakryiko" <andrii@kernel.org>,
	"Mykyta Yatsenko" <yatsenko@meta.com>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Shuah Khan" <shuah@kernel.org>, "Thomas Graf" <tgraf@suug.ch>,
	"Eduard Zingerman" <eddyz87@gmail.com>,
	"Kumar Kartikeya Dwivedi" <memxor@gmail.com>,
	"Martin KaFai Lau" <martin.lau@linux.dev>,
	"Song Liu" <song@kernel.org>,
	"Yonghong Song" <yonghong.song@linux.dev>,
	"Jiri Olsa" <jolsa@kernel.org>,
	"Emil Tsalapatis" <emil@etsalapatis.com>,
	"Ihor Solodrai" <ihor.solodrai@linux.dev>, <bpf@vger.kernel.org>,
	<linux-crypto@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<linux-kselftest@vger.kernel.org>, <tz2294@columbia.edu>
Subject: Re: [PATCH bpf v2 1/4] rhashtable: Add trylock_irqsoff for callers that can't spin
Date: Sat, 05 Dec 2026 04:23:10 +0000	[thread overview]
Message-ID: <DNCIGK1J9845.2FRTH78ZTZY8P@gmail.com> (raw)
In-Reply-To: <axJF-QDb1VlRdOLl@gondor.apana.org.au>

On Thu, Dec 03, 2026 at 08:47 PM Herbert Xu <herbert@gondor.apana.org.au> wrote:
> Please call it something more obvious like used_in_nmi.

It's not only NMI. rht_lock_nested() calls lock_acquire_exclusive()
with the bit set. With lockdep a prog on the lock_acquire tracepoint
runs there and in_nmi() is false.
How about "reentrant" ?

> But I have to say that I'd rather draw a line and say that rhashtable
> should not be used in NMI handlers and if you guys need that please
> design your own data structure.

BPF_MAP_TYPE_RHASH is uapi since 7.2.
Are you suggesting to copy paste the whole rhashtable logic
into kernel/bpf/ ?
We can, but that's silly. no?

Can you live with the flag under a better name?


  reply	other threads:[~2026-12-05  4:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-23  0:25 [PATCH bpf v2 0/4] bpf: Don't spin on rhtab bucket locks with IRQs disabled Mani Tofigh via B4 Relay
2026-11-23  0:25 ` [PATCH bpf v2 1/4] rhashtable: Add trylock_irqsoff for callers that can't spin Mani Tofigh via B4 Relay
2026-11-23  0:58   ` bot+bpf-ci
2026-12-04  4:47   ` Herbert Xu
2026-12-05  4:23     ` Alexei Starovoitov [this message]
2026-11-23  0:25 ` [PATCH bpf v2 2/4] rhashtable: Don't retry trylock_irqsoff lookups with IRQs disabled Mani Tofigh via B4 Relay
2026-11-23  0:25 ` [PATCH bpf v2 3/4] bpf: Don't spin on rhtab bucket locks " Mani Tofigh via B4 Relay
2026-11-23  1:13   ` bot+bpf-ci
2026-11-23  0:25 ` [PATCH bpf v2 4/4] selftests/bpf: Test rhtab deletes from inside a resize Mani Tofigh via B4 Relay

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=DNCIGK1J9845.2FRTH78ZTZY8P@gmail.com \
    --to=alexei.starovoitov@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=andrii@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=emil@etsalapatis.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=ihor.solodrai@linux.dev \
    --cc=jolsa@kernel.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=memxor@gmail.com \
    --cc=mt4022@columbia.edu \
    --cc=shuah@kernel.org \
    --cc=song@kernel.org \
    --cc=tgraf@suug.ch \
    --cc=tz2294@columbia.edu \
    --cc=yatsenko@meta.com \
    --cc=yonghong.song@linux.dev \
    /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