summaryrefslogtreecommitdiff
path: root/usr
diff options
context:
space:
mode:
authorKent Overstreet <koverstreet@google.com>2013-05-28 13:46:59 -0700
committerKent Overstreet <koverstreet@google.com>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 <koverstreet@google.com> Cc: Zach Brown <zab@redhat.com> Cc: Felipe Balbi <balbi@ti.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Mark Fasheh <mfasheh@suse.com> Cc: Joel Becker <jlbec@evilplan.org> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Jens Axboe <axboe@kernel.dk> Cc: Asai Thambi S P <asamymuthupa@micron.com> Cc: Selvan Mani <smani@micron.com> Cc: Sam Bradshaw <sbradshaw@micron.com> Cc: Jeff Moyer <jmoyer@redhat.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Benjamin LaHaise <bcrl@kvack.org>
Diffstat (limited to 'usr')
0 files changed, 0 insertions, 0 deletions