nvme-tcp: avoid scheduling io_work if we are already polling
authorSagi Grimberg <sagi@grimberg.me>
Fri, 1 May 2020 21:25:44 +0000 (14:25 -0700)
committerJens Axboe <axboe@kernel.dk>
Sat, 9 May 2020 22:18:36 +0000 (16:18 -0600)
commit72e5d757c62029664c0287d14519ec4451901b5e
tree7ed9be40a5b02309c28f84868a158d028e7c6b4e
parent386e5e6e1aa90b479fcf0467935922df8524393d
nvme-tcp: avoid scheduling io_work if we are already polling

When the user runs polled I/O, we shouldn't have to trigger
the workqueue to generate the receive work upon the .data_ready
upcall. This prevents a redundant context switch when the
application is already polling for completions.

Proposed-by: Mark Wunderlich <mark.wunderlich@intel.com>
Signed-off-by: Mark Wunderlich <mark.wunderlich@intel.com>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/nvme/host/tcp.c