block: loop: convert to blk-mq

From: Ming Lei
Date: Sat Aug 30 2014 - 12:09:01 EST


Hi,

The following 6 patches convert current loop driver into blk-mq:

- loop's scalability gets improved much
- loop driver gets quite simplified, and the conversion can
be throught as cleanup

The previous kernel AIO patches will be submitted in another patchset
for improving loop's performance.

V2:
- replace work queue with kthread worker because wq may cause
regression on some fast devices(such as loop over null_blk, tmpfs
file, ...), in these cases, loop thread becomes CPU bound actually,
so work queue will introduce lots of unnecessary context switch, and
decrease throughput a lot one this cases
- introduce prepare_flush_rq_fn callback and its pair in blk-mq ops
for setting up flush rq's pdu correctly
- move kernel aio patches into another patchset as suggested by
Christoph
- no change in the other 4 patches

V1:
- improve failure path in aio_kernel_submit()

block/blk-flush.c | 4 +
block/blk-mq.c | 16 +-
block/blk-mq.h | 1 -
drivers/block/loop.c | 411 +++++++++++++++++++++++++-----------------------
drivers/block/loop.h | 20 ++-
include/linux/blk-mq.h | 14 ++
6 files changed, 259 insertions(+), 207 deletions(-)



Thanks,
--
Ming Lei

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/