git: 296156264072 - stable/15 - nvme: Tweak completion timeout loop
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 09 Oct 2025 12:21:38 UTC
The branch stable/15 has been updated by des:
URL: https://cgit.FreeBSD.org/src/commit/?id=29615626407279b9c995ffe9aa0f577de4752634
commit 29615626407279b9c995ffe9aa0f577de4752634
Author: Dag-Erling Smørgrav <des@FreeBSD.org>
AuthorDate: 2025-10-08 10:07:13 +0000
Commit: Dag-Erling Smørgrav <des@FreeBSD.org>
CommitDate: 2025-10-09 12:16:05 +0000
nvme: Tweak completion timeout loop
* Rename delta_t to avoid misleading simplistic syntax highlighters
* Simplify the increment calculation
Sponsored by: Klara, Inc.
Sponsored by: NetApp, Inc.
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D52973
(cherry picked from commit 4070ae0e9a60715199f83004e7ebdfb169fc8cfc)
---
sys/dev/nvme/nvme_private.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/sys/dev/nvme/nvme_private.h b/sys/dev/nvme/nvme_private.h
index 52f9e12f8f9a..52e9fcbbebcd 100644
--- a/sys/dev/nvme/nvme_private.h
+++ b/sys/dev/nvme/nvme_private.h
@@ -463,13 +463,13 @@ static __inline void
nvme_completion_poll(struct nvme_completion_poll_status *status)
{
int timeout = ticks + 10 * hz;
- sbintime_t delta_t = SBT_1US;
+ sbintime_t delta = SBT_1US;
while (!atomic_load_acq_int(&status->done)) {
if (timeout - ticks < 0)
panic("NVME polled command failed to complete within 10s.");
- pause_sbt("nvme", delta_t, 0, C_PREL(1));
- delta_t = min(SBT_1MS, delta_t * 3 / 2);
+ pause_sbt("nvme", delta, 0, C_PREL(1));
+ delta = min(SBT_1MS, delta + delta / 2);
}
}