srcutree: Remove srcu_barrier() sleep for atomic SRCU

The atomic-SRCU path in srcu_barrier() sleeps for 100 milliseconds just
in case there are callbacks to wait for.  But call_srcu() refuses
atomic SRCU with a WARN_ON_ONCE() before reaching the deferred-enqueue
path, so there can be no callbacks, deferred or otherwise.

Drop the sleep.

Signed-off-by: Kunwu Chan <kunwu.chan@gmail.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
This commit is contained in:
Kunwu Chan 2026-09-07 15:58:27 +08:00 committed by Paul E. McKenney
parent 41f899f18d
commit 47138812bc

View File

@ -1892,12 +1892,9 @@ void srcu_barrier(struct srcu_struct *ssp)
unsigned long s;
check_init_srcu_struct(ssp, false);
if (WARN_ON_ONCE(ssp->srcu_reader_flavor == SRCU_READ_FLAVOR_ATOMIC)) {
// There shouldn't be any callbacks for atomic SRCU,
// but just in case.
schedule_timeout_uninterruptible(HZ/10);
// Atomic SRCU has no callbacks, so there is nothing to wait on.
if (WARN_ON_ONCE(ssp->srcu_reader_flavor == SRCU_READ_FLAVOR_ATOMIC))
return;
}
/*
* Register any deferred callbacks before snapshotting the sequence. The