mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: bot+bpf-ci@kernel.org
To: mt4022@columbia.edu,ast@kernel.org,daniel@iogearbox.net,andrii@kernel.org,yatsenko@meta.com,herbert@gondor.apana.org.au,akpm@linux-foundation.org,shuah@kernel.org
Cc: tgraf@suug.ch,eddyz87@gmail.com,memxor@gmail.com,martin.lau@linux.dev,song@kernel.org,yonghong.song@linux.dev,jolsa@kernel.org,emil@etsalapatis.com,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,mt4022@columbia.edu,ast@kernel.org,andrii@kernel.org,daniel@iogearbox.net,martin.lau@kernel.org,eddyz87@gmail.com,yonghong.song@linux.dev,mason@kernel.org,ihor.solodrai@linux.dev
Subject: Re: [PATCH bpf v2 1/4] rhashtable: Add trylock_irqsoff for callers that can't spin
Date: Mon, 23 Nov 2026 00:58:19 +0000 (UTC)	[thread overview]
Message-ID: <9adaadb2bd9667d049d68e9e4ed3dc4cf6204174b365029bd8422aeb759c2d11@mail.kernel.org> (raw)
In-Reply-To: <20261122-bpf-rhtab-irqs-disabled-v2-1-207aedcc2215@columbia.edu>

[-- Attachment #1: Type: text/plain, Size: 1909 bytes --]

> rhashtable: Add trylock_irqsoff for callers that can't spin

TL;DR: Nits only: documentation gaps. The new -EBUSY return isn't in the
remove kernel-doc, and the member doc omits UP always returning -EBUSY with
IRQs off.

> diff --git a/include/linux/rhashtable-types.h b/include/linux/rhashtable-types.h
> --- a/include/linux/rhashtable-types.h
> +++ b/include/linux/rhashtable-types.h
> @@ -52,6 +52,8 @@ typedef int (*rht_obj_cmpfn_t)(struct rhashtable_compare_arg *arg,
>   * @min_size: Minimum size while shrinking
>   * @insecure_elasticity: Set to true to disable chain length checks
>   * @automatic_shrinking: Enable automatic shrinking of tables
> + * @trylock_irqsoff: With irqs disabled insert and remove don't spin on
> + *		     the bucket lock and return -EBUSY

This isn't a bug, but should this member doc also say that on UP without
CONFIG_DEBUG_SPINLOCK these calls always return -EBUSY when IRQs are
disabled?  Only the commit message mentions it.

[ ... ]

> diff --git a/include/linux/rhashtable.h b/include/linux/rhashtable.h
> --- a/include/linux/rhashtable.h
> +++ b/include/linux/rhashtable.h

[ ... ]

> @@ -1066,7 +1094,8 @@ static __always_inline int __rhashtable_remove_fast_one(
>  	if (!bkt)
>  		return -ENOENT;
>  	pprev = NULL;
> -	flags = rht_lock(tbl, bkt);
> +	if (!rht_lock_or_busy(tbl, bkt, params, &flags))
> +		return -EBUSY;

This isn't a bug, but rhashtable_remove_fast() and rhltable_remove() can now
return -EBUSY through this path, and their kernel-doc still says:

 * Returns zero on success, -ENOENT if the entry could not be found.

Should the Returns lines mention -EBUSY when params.trylock_irqsoff is set?

[ ... ]

---
AI reviewed your patch. Please fix the bug or email reply why it's not a bug.
See: https://github.com/kernel-patches/vmtest/blob/master/ci/claude/README.md

CI run summary: https://github.com/kernel-patches/bpf/actions/runs/45090312341

  reply	other threads:[~2026-11-23  0:58 UTC|newest]

Thread overview: 7+ 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 [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=9adaadb2bd9667d049d68e9e4ed3dc4cf6204174b365029bd8422aeb759c2d11@mail.kernel.org \
    --to=bot+bpf-ci@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=andrii@kernel.org \
    --cc=ast@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@kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=mason@kernel.org \
    --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

all inboxes | Powered by JetHome®