[PATCH v2] nvme: reduce firmware activation poll interval

From: guzebing

Date: Tue Jul 14 2026 - 05:36:11 EST


From: Guzebing <guzebing@xxxxxxxxxxxxx>

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 <guzebing@xxxxxxxxxxxxx>
---
Changes in v2:
- Drop the module parameter and use a fixed 1 to 2 ms poll interval.

v1: https://lore.kernel.org/linux-nvme/20260627010610.47768-1-guzebing1612@xxxxxxxxx/

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