[PATCH v4 2/3] nvme: check IO start time when deciding to defer KA

Keith Busch kbusch at kernel.org
Wed May 24 13:39:10 PDT 2023


On Wed, May 24, 2023 at 01:38:08PM -0600, Uday Shankar wrote:
> +	/*
> +	 * Completions of long-running commands should not be able to
> +	 * defer sending of periodic keep alives, since the controller
> +	 * may have completed processing such commands a long time ago
> +	 * (arbitrarily close to command submission time).
> +	 */
> +	if (ctrl->kas && nvme_req(req)->start_time >= ctrl->ka_last_check_time)
>  		ctrl->comp_seen = true;

Instead of saving start_time, 'req->deadline - req->timeout' should get
the same result. And you won't have to set nvme's start_time twice for
the mpath case.



More information about the Linux-nvme mailing list