direct-io: get rid of the regular bio list and associated lock
authorJens Axboe <axboe@kernel.dk>
Fri, 14 Dec 2012 09:29:48 +0000 (10:29 +0100)
committerJens Axboe <axboe@kernel.dk>
Mon, 22 Apr 2013 01:29:59 +0000 (19:29 -0600)
commitd16681b307ff5fd259043de36187f175ddf43d9a
tree34a6dd2d138d947d83809e9e922839a0be0f8182
parent75bfd166676d13faaf3c18164942aec5881ae4b2
direct-io: get rid of the regular bio list and associated lock

For direct-io, the dio bio lock is quite contended. It's a classic
case of submit vs completion contention, which prevents us from
scaling with O_DIRECT on bigger systems and/or faster devices.

Change the dio refcount to an atomic_t and the dio bio list to a
lockless list.

For dio_await_completion(), don't reap events individually. The only
use case we have is reaping all events, so set it up like that instead.

Use memset() for dio_submit structure clear, instead of zero filling
it on the stack. Has been shown to improve cache utilization.

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