On 8/25/26 21:33, Zqiang wrote:
If srcu_barrier() be invoke before srcu_cleanup(), and after srcu_barrier()
completion, there are no concurrent srcu grace period start again (e.g.
call_srcu() calls),
the timer_delete_sync() should return false, the rcu_segcblist_n_cbs()
will not be check.
Or did I miss something?
In srcu_gp_end(), delayed work timer is always armed in SRCU_SIZE_SMALL
mode regardless of whether its cblist has callbacks:
if (ss_state < SRCU_SIZE_WAIT_BARRIER) {
srcu_schedule_cbs_sdp(per_cpu_ptr(ssp->sda, get_boot_cpu_id()),
cbdelay);
} else {
...
}
and with cbdelay=1 (the non-expedited path) srcu_schedule_cbs_sdp() arms
the per-CPU delay_work timer for the next jiffy. This includes the
srcu_gp_end() whose grace period makes the barrier's callbacks ready, so
an armed timer is left pending when srcu_invoke_callbacks() completes
the barrier.
Thanks
Sunho Park