block: fast-path for small and simple direct I/O requests
authorChristoph Hellwig <hch@lst.de>
Mon, 31 Oct 2016 17:59:25 +0000 (11:59 -0600)
committerJens Axboe <axboe@fb.com>
Thu, 17 Nov 2016 05:20:29 +0000 (22:20 -0700)
commit61a753e9f9097373d037e240558a2d45382138cf
treee29cb0288da82965a72874c763497772d75b1d75
parent4121d385f1457d9beb2067d4b5b4659ef3e6c316
block: fast-path for small and simple direct I/O requests

This patch adds a small and simple fast patch for small direct I/O
requests on block devices that don't use AIO.  Between the neat
bio_iov_iter_get_pages helper that avoids allocating a page array
for get_user_pages and the on-stack bio and biovec this avoid memory
allocations and atomic operations entirely in the direct I/O code
(lower levels might still do memory allocations and will usually
have at least some atomic operations, though).

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
Tested-By: Stephen Bates <sbates@raithlin.com>
Reviewed-By: Stephen Bates <sbates@raithlin.com>
fs/block_dev.c