Project

General

Profile

Feature #6234

nvme should support polled I/O

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

Status:
Closed
Priority:
Normal
Category:
-
Start date:
2015-09-15
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

The nvme driver needs to support polled I/O so that it can be used for kernel core dumping.

History

#1

Updated by Hans Rosenfeld over 2 years ago

The actual dump support is pretty simple: as interrupts are turned off, all we need to do is to call nvme_retrieve_cmd() repeatedly until we get our command back, and hand that off to blkdev.

It turned out that the locking in nvme_retrieve_cmd() was insufficient for this to work right. We need to lock the queue pair before we get the CQE from the queue head, and we need to keep the lock until we updated the head doorbell register. If that isn't done two retrievals running in parallel might grab the same CQE from head and then race for the actual retrieval, and the loser will trip an ASSERT.

#2

Updated by Electric Monk over 2 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

git commit 4ac9cfccca470985479d54f113ab420ee8215120

commit  4ac9cfccca470985479d54f113ab420ee8215120
Author: Hans Rosenfeld <hans.rosenfeld@joyent.com>
Date:   2017-07-21T14:37:42.000Z

    6234 nvme should support polled I/O
    Reviewed by: Robert Mustacchi <rm@joyent.com>
    Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
    Reviewed by: Yuri Pankov <yuripv@gmx.com>
    Reviewed by: Igor Kozhukhov <igor@dilos.org>
    Reviewed by: Toomas Soome <tsoome@me.com>
    Approved by: Richard Lowe <richlowe@richlowe.net>

Also available in: Atom PDF