Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102922006
D33781.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D33781.id.diff
View Options
diff --git a/sys/dev/nvme/nvme_qpair.c b/sys/dev/nvme/nvme_qpair.c
--- a/sys/dev/nvme/nvme_qpair.c
+++ b/sys/dev/nvme/nvme_qpair.c
@@ -948,7 +948,6 @@
struct nvme_qpair *qpair = arg;
struct nvme_controller *ctrlr = qpair->ctrlr;
struct nvme_tracker *tr;
- struct nvme_tracker *tr_temp;
sbintime_t now;
bool idle;
uint32_t csts;
@@ -962,8 +961,12 @@
if (idle)
break;
now = getsbinuptime();
- TAILQ_FOREACH_SAFE(tr, &qpair->outstanding_tr, tailq, tr_temp) {
- if (now > tr->deadline && tr->deadline != 0) {
+ idle = true;
+ TAILQ_FOREACH(tr, &qpair->outstanding_tr, tailq) {
+ if (tr->deadline == SBT_MAX)
+ continue;
+ idle = false;
+ if (now > tr->deadline) {
/*
* We're now passed our earliest deadline. We
* need to do expensive things to cope, but next
@@ -1028,7 +1031,7 @@
* Rearm the timeout.
*/
if (!idle) {
- callout_schedule(&qpair->timer, hz / 2);
+ callout_schedule_sbt(&qpair->timer, SBT_1S / 2, SBT_1S / 2, 0);
} else {
qpair->timer_armed = false;
}
@@ -1061,8 +1064,8 @@
tr->deadline = getsbinuptime() + timeout * SBT_1S;
if (!qpair->timer_armed) {
qpair->timer_armed = true;
- callout_reset_on(&qpair->timer, hz / 2,
- nvme_qpair_timeout, qpair, qpair->cpu);
+ callout_reset_sbt_on(&qpair->timer, SBT_1S / 2, SBT_1S / 2,
+ nvme_qpair_timeout, qpair, qpair->cpu, 0);
}
} else
tr->deadline = SBT_MAX;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Nov 19, 6:50 PM (12 h, 20 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14721898
Default Alt Text
D33781.id.diff (1 KB)
Attached To
Mode
D33781: nvme: Do not rearm timeout for commands without one.
Attached
Detach File
Event Timeline
Log In to Comment