`nvme_disable_ctrl()` takes 411 ms on a Dell XPS 13 with SK hynix PC300 NVMEe

Paul Menzel pmenzel at molgen.mpg.de
Wed May 1 13:58:05 PDT 2024


Dear Keith, dear Christoph,


Am 01.05.24 um 09:58 schrieb Keith Busch:
> On Wed, May 01, 2024 at 06:51:45AM +0200, Christoph Hellwig wrote:
>> On Wed, May 01, 2024 at 06:29:12AM +0200, Paul Menzel wrote:
>>> Could a warning be logged, when this takes more than 50 ms with a hint that
>>> the disk vendor should improve their firmware?
>>
>> Not sure why we'd warn about it.  A clean shutdown can definitively take
>> some time and there's nothing tha forbids it.  I don't think a linux
>> message is going to have any effect on firmware engineering..
> 
> Exactly. Unless the device reports a lower D3 entry latency, then this
> sounds like everything is working-as-designed.

Maybe according to the spec, but I have a hard time to believe, that 
disks should take longer to shut down than coreboot to initialize a 
mainboard.

In the end, in my opinion, users cannot make an informed decision, if 
these things are hidden. If it would be visible somehow in the logs – 
maybe not warning but info level – then even not so technical users 
could inform themselves and factor this in their buying decision.

> You can check your device's advertised shutdown time (assuming your
> device is nvme0):
> 
>    nvme id-ctrl /dev/nvme0 | grep rtd3e
> 
> The value is reported in microseconds. If it shows 0, then the device
> doesn't report an expected shutdown time.

Thank you for sharing. It’s 60 ms:

     $ sudo nvme id-ctrl /dev/nvme0 | grep rtd3e
     rtd3e     : 0xea60

6 * 16 + 10 * 256 + 14 * 16 * 256 = 60000

No idea, if ftrace skews something.


Kind regards,

Paul



More information about the Linux-nvme mailing list