nvme should support polled I/O
The nvme driver needs to support polled I/O so that it can be used for kernel core dumping.
Updated by Hans Rosenfeld over 3 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.
Updated by Electric Monk about 3 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
commit 4ac9cfccca470985479d54f113ab420ee8215120 Author: Hans Rosenfeld <firstname.lastname@example.org> Date: 2017-07-21T14:37:42.000Z 6234 nvme should support polled I/O Reviewed by: Robert Mustacchi <email@example.com> Reviewed by: Jerry Jelinek <firstname.lastname@example.org> Reviewed by: Yuri Pankov <email@example.com> Reviewed by: Igor Kozhukhov <firstname.lastname@example.org> Reviewed by: Toomas Soome <email@example.com> Approved by: Richard Lowe <firstname.lastname@example.org>