nvme: fine-tune sending of first keep-alive
authorMark O'Donovan <shiftee@posteo.net>
Fri, 24 Nov 2023 20:56:59 +0000 (20:56 +0000)
committerKeith Busch <kbusch@kernel.org>
Mon, 27 Nov 2023 18:23:13 +0000 (10:23 -0800)
commit136cfcb8dce9bc7a17a8d32e497f4dfe80dd357d
tree93986976ea5f9f2c39463de33f1c92db7ff90fc3
parentbb6cc253861bd5a7cf8439e2118659696df9619f
nvme: fine-tune sending of first keep-alive

Keep-alive commands are sent half-way through the kato period.
This normally works well but fails when the keep-alive system is
started when we are more than half way through the kato.
This can happen on larger setups or due to host delays.
With this change we now time the initial keep-alive command from
the controller initialisation time, rather than the keep-alive
mechanism activation time.

Signed-off-by: Mark O'Donovan <shiftee@posteo.net>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Keith Busch <kbusch@kernel.org>
drivers/nvme/host/core.c