Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F151679106
D32259.id96088.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
555 B
Referenced Files
None
Subscribers
None
D32259.id96088.diff
View Options
Index: sys/dev/nvme/nvme_private.h
===================================================================
--- sys/dev/nvme/nvme_private.h
+++ sys/dev/nvme/nvme_private.h
@@ -469,7 +469,13 @@
nvme_completion_poll(struct nvme_completion_poll_status *status)
{
int sanity = hz * 10;
+ int sanity2 = 1000 * max(1, (1000 / hz));
+ /*
+ * Adaptively spin for the first ~ms
+ */
+ while (!atomic_load_acq_int(&status->done) && --sanity2 > 0)
+ DELAY(1);
while (!atomic_load_acq_int(&status->done) && --sanity > 0)
pause("nvme", 1);
if (sanity <= 0)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Apr 10, 11:27 PM (24 m, 21 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31253457
Default Alt Text
D32259.id96088.diff (555 B)
Attached To
Mode
D32259: nvme: Use adaptive spinning when polling for completion or state change
Attached
Detach File
Event Timeline
Log In to Comment