Bug #8628
closednvme: use a semaphore to guard submission queue
100%
Description
The current command submission logic in nvme suffers from the fact that it can fail iff the queue is full. This complicates a bunch of places where commands are submitted as we always need to check for errors.
It makes much more sense to have a semaphore as part of each queue pair that guards submission of commands. That will allow for a lot cleaner code in many places. The downside of this is that we might end up blocking in command submission if the queues are really small, but as we're only submitting commands in places where we can block I see no problem there.
Related issues
Updated by Hans Rosenfeld almost 5 years ago
Webrev: https://grumpf.hope-2000.org/illumos-8628/
I have extensively tested this code in combination with #8629, but also without it. My tests consisted of a number of repeated parallel iozone processes running on Intel P3700 and Samsung SM951 devices. I did not observe any hangs or other weird behavior with this change.
This change has been in illumos-joyent since July.
Updated by Electric Monk almost 5 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
git commit 4b324362d54967a3ccfad8a9b113978ea1b38feb
commit 4b324362d54967a3ccfad8a9b113978ea1b38feb Author: Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org> Date: 2017-09-25T09:11:07.000Z 8628 nvme: use a semaphore to guard submission queue Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com> Reviewed by: Jason King <jason.king@joyent.com> Reviewed by: Robert Mustacchi <rm@joyent.com> Reviewed by: Garrett D'Amore <garrett@damore.org> Approved by: Richard Lowe <richlowe@richlowe.net>
Updated by Marcel Telka about 4 years ago
- Related to Bug #9249: System crash dump to NVME not working added