Re: [PATCH] nvme/pci: Use host managed power state for suspend

From: Christoph Hellwig
Date: Mon May 13 2019 - 10:56:11 EST


On Mon, May 13, 2019 at 02:43:43PM +0000, Mario.Limonciello@xxxxxxxx wrote:
> Well I've got a thought, quoting the NVME spec:
> "After a successful completion of a Set Features command for this feature, the controller shall be in the
> Power State specified. If enabled, autonomous power state transitions continue to occur from the new state."
>
> If APST is enabled on this disk, what is to stop an autonomous reverse
> transition from queue activity on the way down?

Nothing. But once the system is suspending we should not see I/O.

If we see I/O the queue freezing in the original patch Kai Heng and the
previous one from Keith is probably required, although I suspect it
just papers over problems higher up in the queue. If we don't see I/O
the device is just behaving oddly.