[PATCH v2] nvme: reduce firmware activation poll interval
guzebing <[email protected]>
| Newsgroups | org.infradead.lists.linux-nvme,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
From: Guzebing <[email protected]> nvme_fw_act_work() polls the controller processing-paused status every 100 ms while firmware activation is pending. Some devices can complete online activation in only a few hundred milliseconds, so the fixed 100 ms interval can add up to 100 ms of latency before the driver observes completion. Poll every 1 to 2 ms instead. The shorter interval reduces the delay before the driver observes completion and allows the timeout check to track the MTFA boundary more closely. Signed-off-by: Guzebing <[email protected]> --- Changes in v2: - Drop the module parameter and use a fixed 1 to 2 ms poll interval. v1: https://lore.kernel.org/linux-nvme/[email protected]/ drivers/nvme/host/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index 453c1f0b2dd09..c226baf8641a5 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -4813,7 +4813,7 @@ static void nvme_fw_act_work(struct work_struct *work) nvme_try_sched_reset(ctrl); return; } - msleep(100); + usleep_range(1000, 2000); } if (!nvme_change_ctrl_state(ctrl, NVME_CTRL_CONNECTING) || -- 2.20.1