On 1/21/22 5:38 AM, Dylan Yudaken wrote: > In some cases io_rsrc_ref_quiesce will call io_rsrc_node_switch_start, > and then immediately flush the delayed work queue &ctx->rsrc_put_work. > > However the percpu_ref_put does not immediately destroy the node, it > will be called asynchronously via RCU. That ends up with > io_rsrc_node_ref_zero only being called after rsrc_put_work has been > flushed, and so the process ends up sleeping for 1 second unnecessarily. > > This patch executes the put code immediately if we are busy > quiescing. Looks good to me, and as far as I can tell, this bug was introduced by: commit 4a38aed2a0a729ccecd84dca5b76d827b9e1294d Author: Jens Axboe <axboe@xxxxxxxxx> Date: Thu May 14 17:21:15 2020 -0600 io_uring: batch reap of dead file registrations so I'll add a fixes line to that effect to the commit. Thanks! -- Jens Axboe