On Mon, Nov 16, 2026 at 12:12:03AM -0500, Qiliang Yuan wrote: > thin_ctr() adds the new thin to pool->active_thins with > list_add_tail_rcu() and then calls synchronize_rcu(), so that a > wake_worker() call can't miss the bios of a thin that isn't visible yet. > > The grace period doesn't make the entry any more visible. A worker that > walks the list after list_add_tail_rcu() finds the thin, and the thin > gets no bios before its table is resumed. A walk already in progress may > miss it, but the wake_worker() for the first bio queues the worker > again. Still, activating a thin device waits for a full grace period, > which takes about half of the activation. > > Remove the synchronize_rcu() call. > > Activating 100 thin devices of an idle pool with dmsetup create takes > per device (mean of five rounds, min-max of the rounds in parentheses): > > before (ms) after (ms) change > 15.4 (14.9-15.9) 7.6 (7.3-7.8) -51% > > Signed-off-by: Qiliang Yuan <[email protected]>
Reviewed-by: Benjamin Marzinski <[email protected]>
