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>
Fri, 14 Dec 2012 12:28:12 +0000 (13:28 +0100)
commit8a2b425ef7a436674eba4baab9322f45b657a6b5
tree49eff39a3fa10b582cfadaddff9e3c83e868d6b1
parent0c4061cf58a7adddb613428b9dd0f6c8f2de89bd
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