nvme: reduce firmware activation poll interval
PATCH v2 1/1 nvme: reduce firmware activation poll interval
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.
---
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(-)
drivers/nvme/host/core.c +1 -1
@@ -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) ||
Signature · 1 line
2.20.1
Christoph Hellwig
maintainerdrivers/nvme/host/core.c static void nvme_fw_act_work(struct work_struct *work) · line 4816
Quoted 5 lines · guzebing
drivers/nvme/host/core.c +1
-1nvme_try_sched_reset (ctrl);return ; } -msleep (100 ); +usleep_range (1000 ,2000 );
Add a comment that this matches nvme_wait_ready? Or even better add a helper with a name like nvme_busy_wait and add a comment describing the use case?