aio: fix serial draining in exit_aio()
authorJens Axboe <axboe@fb.com>
Wed, 15 Apr 2015 17:17:23 +0000 (11:17 -0600)
committerJens Axboe <axboe@fb.com>
Wed, 15 Apr 2015 17:17:23 +0000 (11:17 -0600)
commitdc48e56d761610da4ea1088d1bea0a030b8e3e43
tree1e72267221c05aff3c4455910df7a787b4beff78
parent2963e3f7e8e3465895897a175560210120b932ac
aio: fix serial draining in exit_aio()

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: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
fs/aio.c
This page took 0.025243 seconds and 5 git commands to generate.