[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMRc=MeZVbM1Bms41Roz-boi_jwJoMiEPniX=RuyZ2KHrxXmxg@mail.gmail.com>
Date: Wed, 21 Jan 2026 11:38:18 +0100
From: Bartosz Golaszewski <brgl@...nel.org>
To: Tzung-Bi Shih <tzungbi@...nel.org>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>, "Rafael J. Wysocki" <rafael@...nel.org>,
Danilo Krummrich <dakr@...nel.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] revocable: Remove redundant synchronize_srcu() call
On Wed, Jan 21, 2026 at 5:03 AM Tzung-Bi Shih <tzungbi@...nel.org> wrote:
>
> When allocating a revocable provider via revocable_provider_alloc(),
> there is no revocable consumers (i.e., RCU readers) yet. Remove the
> redundant synchronize_srcu() call to save cycles.
>
> Signed-off-by: Tzung-Bi Shih <tzungbi@...nel.org>
> ---
> To address the performance impact reported in
> https://lore.kernel.org/linux-gpio/CAMRc=McrFa42mNWmZtD1HKKKZ+USUKpQAAME50wbfxPM7L72gA@mail.gmail.com/.
>
> drivers/base/revocable.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/base/revocable.c b/drivers/base/revocable.c
> index f6cece275aac..b068e18a847d 100644
> --- a/drivers/base/revocable.c
> +++ b/drivers/base/revocable.c
> @@ -99,7 +99,6 @@ struct revocable_provider *revocable_provider_alloc(void *res)
>
> init_srcu_struct(&rp->srcu);
> rcu_assign_pointer(rp->res, res);
> - synchronize_srcu(&rp->srcu);
> kref_init(&rp->kref);
>
> return rp;
> --
> 2.52.0.457.g6b5491de43-goog
>
Do you have an up-to-date integration branch with all the series and
fixes you posted that I could use for testing with GPIO?
Bart
Powered by blists - more mailing lists