git: c2fd9060f32d - stable/14 - nvme: Tweak completion timeout loop
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 09 Oct 2025 12:21:39 UTC
The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=c2fd9060f32d21f60195af010973e5bc8d4d81ee commit c2fd9060f32d21f60195af010973e5bc8d4d81ee 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:20:53 +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 26dc75ba4141..36e04ceb7f31 100644 --- a/sys/dev/nvme/nvme_private.h +++ b/sys/dev/nvme/nvme_private.h @@ -463,13 +463,13 @@ 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); } }