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 about 5 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 5 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
commit 4ac9cfccca470985479d54f113ab420ee8215120 Author: Hans Rosenfeld <email@example.com> Date: 2017-07-21T14:37:42.000Z 6234 nvme should support polled I/O Reviewed by: Robert Mustacchi <firstname.lastname@example.org> Reviewed by: Jerry Jelinek <email@example.com> Reviewed by: Yuri Pankov <firstname.lastname@example.org> Reviewed by: Igor Kozhukhov <email@example.com> Reviewed by: Toomas Soome <firstname.lastname@example.org> Approved by: Richard Lowe <email@example.com>