aboutsummaryrefslogtreecommitdiff
path: root/net/unix
diff options
context:
space:
mode:
authorKent Overstreet <[email protected]>2013-06-12 14:04:59 -0700
committerLinus Torvalds <[email protected]>2013-06-12 16:29:46 -0700
commit4fcc712f5c48b1e32cdbf9b9cfba42a27b2e3160 (patch)
tree56ffa400b048d639e67b3c239a23d1e09a86ae76 /net/unix
parentbba00e59107275faa615573c44eb0a513a1220a6 (diff)
aio: fix io_destroy() regression by using call_rcu()
There was a regression introduced by 36f5588905c1 ("aio: refcounting cleanup"), 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 <[email protected]> Cc: Zach Brown <[email protected]> Cc: Felipe Balbi <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Mark Fasheh <[email protected]> Cc: Joel Becker <[email protected]> Cc: Rusty Russell <[email protected]> Reported-by: Jens Axboe <[email protected]> Tested-by: Jens Axboe <[email protected]> Cc: Asai Thambi S P <[email protected]> Cc: Selvan Mani <[email protected]> Cc: Sam Bradshaw <[email protected]> Cc: Jeff Moyer <[email protected]> Cc: Al Viro <[email protected]> Signed-off-by: Benjamin LaHaise <[email protected]> Tested-by: Benjamin LaHaise <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'net/unix')
0 files changed, 0 insertions, 0 deletions