mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] revocable: Remove redundant synchronize_srcu() call
@ 2026-01-21  4:02 Tzung-Bi Shih
  2026-01-21 10:38 ` Bartosz Golaszewski
  0 siblings, 1 reply; 7+ messages in thread
From: Tzung-Bi Shih @ 2026-01-21  4:02 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rafael J. Wysocki, Danilo Krummrich
  Cc: linux-kernel, tzungbi, Bartosz Golaszewski

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@kernel.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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-01-21 16:58 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-01-21  4:02 [PATCH] revocable: Remove redundant synchronize_srcu() call Tzung-Bi Shih
2026-01-21 10:38 ` Bartosz Golaszewski
2026-01-21 12:34   ` Tzung-Bi Shih
2026-01-21 15:18     ` Bartosz Golaszewski
2026-01-21 16:04       ` Tzung-Bi Shih
2026-01-21 16:58         ` Bartosz Golaszewski
2026-01-21 16:52       ` Tzung-Bi Shih

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®