RE: [PATCH] nvme: Change our APST table to be no more aggressive than Intel RSTe

From: Mario.Limonciello
Date: Mon May 15 2017 - 11:51:13 EST


> On Fri, May 12, 2017 at 7:34 AM, <Mario.Limonciello@xxxxxxxx> wrote:
> >>Yes, mostly. I've written the patch, but I was planning to target it
> >>at 4.12 or 4.13 but not -stable. It's mostly just a cleanup and has
> >>no real power saving benefit since the RSTe timeouts are so absurdly
> >>conservative that I doubt PS4 will happen in practical usage.
> > OK.
> >
> >>Perhaps
> >>in suspend-to-idle? (For suspend-to-idle, I suspect we should really
> >>be using D3 instead. Do we already do that?)
> >
> > Well I think this will depend upon what the SSD "will" support.
>
> I thought it was basically impossible for the SSD to fail to support
> D3. Afterall, cutting the power due to runtime D3 is more or less the
> same thing (from the SSD's POV) as cutting the power during S3 or full
> power off.
>
You need to have an extra load switch in the system for this to work with
RTD3.

At least today - no Dell systems put the drive into RTD3 when going into
Modern Standby. It's all PS4.

> I've contemplated adding runtime D3 support to the nvme driver, but it
> would probably be barely a win and quite slow.
>
> When Linux suspends-to-idle, does it call driver suspend callbacks and
> kick devices into D3? It should work, but I don't know what actually
> happens.

There are callback that happen for drivers. It doesn't need to be a dedicated
callback specifically for freeze (what's invoked with S2I).
For example Qualcomm WLAN driver when the client disconnects from the
AP will put the card into RTD3. That will happen while going down to S2I.