path: root/usr
diff options
authorKent Overstreet <>2013-05-28 13:46:59 -0700
committerKent Overstreet <>2013-06-17 19:37:01 -0700
commit5ce6600410cab60ca6bc41d9afed98b7574d1e8b (patch)
treea272c8306a1c5e8c8ab71af66ad98bc70c2e3b8d /usr
parentf141b98b6839053d90f5e85d1f45e52383a74c13 (diff)
aio: Fix io_destroy() regression by using call_rcu()
There was a regression introduced by 36f5588, reported by Jens Axboe - the refcounting cleanup switched to using RCU in the shutdown path, but the synchronize_rcu() was done in the context of the io_destroy() syscall greatly increasing the time it could block. This patch switches it to call_rcu() and makes shutdown asynchronous (more asynchronous than it was originally; before the refcount changes io_destroy() would still wait on pending kiocbs). Note that there's a global quota on the max outstanding kiocbs, and that quota must be manipulated synchronously; otherwise io_setup() could return -EAGAIN when there isn't quota available, and userspace won't have any way of waiting until shutdown of the old kioctxs has finished (besides busy looping). So we release our quota before kioctx shutdown has finished, which should be fine since the quota never corresponded to anything real anyways. Signed-off-by: Kent Overstreet <> Cc: Zach Brown <> Cc: Felipe Balbi <> Cc: Greg Kroah-Hartman <> Cc: Mark Fasheh <> Cc: Joel Becker <> Cc: Rusty Russell <> Cc: Jens Axboe <> Cc: Asai Thambi S P <> Cc: Selvan Mani <> Cc: Sam Bradshaw <> Cc: Jeff Moyer <> Cc: Al Viro <> Cc: Benjamin LaHaise <>
Diffstat (limited to 'usr')
0 files changed, 0 insertions, 0 deletions