Project

General

Profile

Bug #8628

nvme: use a semaphore to guard submission queue

Added by Hans Rosenfeld about 2 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Normal
Category:
driver - device drivers
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

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

Related to illumos gate - Bug #9249: System crash dump to NVME not workingClosed2018-03-06

Actions

History

#1

Updated by Hans Rosenfeld about 2 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.

#2

Updated by Electric Monk about 2 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>

#3

Updated by Marcel Telka over 1 year ago

  • Related to Bug #9249: System crash dump to NVME not working added

Also available in: Atom PDF