nvme: support traffic based keep-alive
authorSagi Grimberg <sagi@grimberg.me>
Fri, 2 Nov 2018 17:28:15 +0000 (10:28 -0700)
committerJens Axboe <axboe@kernel.dk>
Sat, 8 Dec 2018 05:26:55 +0000 (22:26 -0700)
commit6e3ca03ee934572d5de4fb2224c01e12c4d422c8
treeb6e8dc7fa480aefbd87f68712e651e3cda747078
parent3e53ba38a9404434a8b57683825279f4305b5a76
nvme: support traffic based keep-alive

If the controller supports traffic based keep alive, we restart the keep
alive timer if any admin or io commands was completed during the kato
period.  This prevents a possible starvation of keep alive commands in
the presence of heavy traffic as in such case, we already have a health
indication from the host perspective.

Only set a comp_seen indicator in case the controller supports keep
alive to minimize the overhead for pci controllers.

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/core.c
drivers/nvme/host/nvme.h
include/linux/nvme.h