direct-io: only inc/dec inode->i_dio_count for file systems
authorJens Axboe <axboe@kernel.dk>
Wed, 24 Apr 2013 21:42:09 +0000 (15:42 -0600)
committerJens Axboe <axboe@kernel.dk>
Fri, 24 May 2013 18:22:52 +0000 (20:22 +0200)
commit17d8b370162b98a064e2a6b5e29838f98f5d3ee1
treeaad421f163c22fb28f94d607a0e9fb01b2d0399e
parent28f616d0756b72db47ee95963cfee3bbcb7e54e4
direct-io: only inc/dec inode->i_dio_count for file systems

We don't need truncate protection for block devices, so add a flag
bypassing this cache line dirtying twice for every IO. This easily
contributes to 5-10% of the CPU time on high IOPS O_DIRECT testing.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/block_dev.c
fs/direct-io.c
fs/inode.c
include/linux/fs.h