OSDN Git Service

nvmet: use IOCB_NOWAIT for file-ns buffered I/O
authorChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Wed, 14 Nov 2018 06:12:19 +0000 (01:12 -0500)
committerJens Axboe <axboe@kernel.dk>
Sat, 8 Dec 2018 05:26:56 +0000 (22:26 -0700)
commit50a909db36f244bcfec6e02598d31c0b0a468175
treed58497890df4cbe429c0164a48b05d83c877632a
parentc09305ae49970e15cd18828c0f78b766e8cf224f
nvmet: use IOCB_NOWAIT for file-ns buffered I/O

This patch optimizes read command behavior when file-ns configured
with buffered I/O. Instead of offloading the buffered I/O read operations
to the worker threads, we first issue the read operation with IOCB_NOWAIT
and try and access the data from the cache. Here we only offload the
request to the worker thread and complete the request in the worker
thread context when IOCB_NOWAIT request fails.

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/nvme/target/io-cmd-file.c