Skip to content
  • Jens Axboe's avatar
    aio: fix serial draining in exit_aio() · dc48e56d
    Jens Axboe authored
    
    
    exit_aio() currently serializes killing io contexts. Each context
    killing ends up having to do percpu_ref_kill(), which in turns has
    to wait for an RCU grace period. This can take a long time, depending
    on the number of contexts. And there's no point in doing them serially,
    when we could be waiting for all of them in one fell swoop.
    
    This patches makes my fio thread offload test case exit 0.2s instead
    of almost 6s.
    
    Reviewed-by: default avatarJeff Moyer <jmoyer@redhat.com>
    Signed-off-by: default avatarJens Axboe <axboe@fb.com>
    dc48e56d