direct-io: only inc/dec inode->i_dio_count for file systems blk-mq/misc
authorJens Axboe <axboe@kernel.dk>
Fri, 25 Oct 2013 18:05:54 +0000 (19:05 +0100)
committerJens Axboe <axboe@kernel.dk>
Fri, 25 Oct 2013 18:05:54 +0000 (19:05 +0100)
commit945514c44435b3a7625d0ce3cbd002b3d246b70b
tree1b19e246231e6ee4a659393ef66800e1bea96a3e
parent280d45f6c35d8d7a0fe20c36caf426e3ac139cf9
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.

Cc: Christoph Hellwig <hch@infradead.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: akpm@linux-foundation.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/block_dev.c
fs/btrfs/inode.c
fs/direct-io.c
fs/ext4/indirect.c
fs/ext4/inode.c
fs/inode.c
fs/nfs/direct.c
include/linux/fs.h