Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
aio: protect reqs_available updates from changes in interrupt handlers
As of commit f8567a3 it is now possible to have put_reqs_available() called from irq context. While put_reqs_available() is per cpu, it did not protect itself from interrupts on the same CPU. This lead to aio_complete() corrupting the available io requests count when run under a heavy O_DIRECT workloads as reported by Robert Elliott. Fix this by disabling irq updates around the per cpu batch updates of reqs_available. Many thanks to Robert and folks for testing and tracking this down. Reported-by: Robert Elliot <[email protected]> Tested-by: Robert Elliot <[email protected]> Signed-off-by: Benjamin LaHaise <[email protected]> Cc: Jens Axboe <[email protected]>, Christoph Hellwig <[email protected]> Cc: [email protected]
- Loading branch information