Thread (7 messages) 7 messages, 4 authors, 2021-08-30

RE: [PATCH v2] nvme: update keep alive interval when kato is modified

From: sasaki tatsuya <hidden>
Date: 2021-08-25 08:26:37
Also in: lkml

On 8/25/21 5:42 AM JST, Sagi Grimberg wrote:
quoted
+	if (cmd->opcode == nvme_admin_set_features &&
+	    (cmd->cdw10 & 0xFF) == NVME_FEAT_KATO) {
+		/* ms -> s */
no need for this comment.
Thanks for your comments. I will remove this /* ms -> s*/ comment.
quoted
+		unsigned int new_kato = DIV_ROUND_UP(cmd->cdw11, 1000);
+
+		nvme_update_keep_alive(ctrl, new_kato);
I think you can now inline nvme_update_keep_alive here, no need to keep
it in a function.
Does this mean the section below needs to be moved from core routine
to nvme_user_cmd_post function?
quoted
+	dev_info(ctrl->device,
+		 "keep alive commands interval on the host is updated from %u ms to %u ms\n",
+		 ctrl->kato * 1000 / 2, new_kato * 1000 / 2);
+
+	nvme_stop_keep_alive(ctrl);
+	ctrl->kato = new_kato;
+	nvme_start_keep_alive(ctrl);
Thanks.


_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help