All of lore.kernel.org
 help / color / mirror / Atom feed
* Anyone working on nvme power management?
@ 2016-01-18 23:23 Andy Lutomirski
  2016-01-19 14:44 ` Matthew Wilcox
  0 siblings, 1 reply; 3+ messages in thread
From: Andy Lutomirski @ 2016-01-18 23:23 UTC (permalink / raw)


It looks like the nvme spec allows both nvme-specific low power states
and D3.  Is anyone working on supporting either of these in the Linux
driver?

Also, the host memory buffer feature seems related, although I can't
find anything in the spec saying what its purpose is.  Is it related
to the power management features?  Does it give faster low-power
exits?

--Andy

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Anyone working on nvme power management?
  2016-01-18 23:23 Anyone working on nvme power management? Andy Lutomirski
@ 2016-01-19 14:44 ` Matthew Wilcox
  2016-01-19 19:37   ` Andy Lutomirski
  0 siblings, 1 reply; 3+ messages in thread
From: Matthew Wilcox @ 2016-01-19 14:44 UTC (permalink / raw)


On Mon, Jan 18, 2016@03:23:31PM -0800, Andy Lutomirski wrote:
> Also, the host memory buffer feature seems related, although I can't
> find anything in the spec saying what its purpose is.  Is it related
> to the power management features?  Does it give faster low-power
> exits?

The host memory buffer exists because some bright spark working on a
drive noticed that it's significantly quicker & higher bandwidth to store
various data in host DRAM than it is to store them on the drive's flash.
So as long as they can twist our arms into allocating host DRAM for
them and tolerate the fact that the contents of the host memory buffer
go away at power-loss, they're going to store all kinds of things there
that they don't want to keep in the drive's own DRAM.

So yes, the HMB may well be used by the drive to store the (hopefully
encrypted) contents of its own DRAM during low-power states where it
wants to power down its DRAM, but it may also be used during regular
operation for other things.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Anyone working on nvme power management?
  2016-01-19 14:44 ` Matthew Wilcox
@ 2016-01-19 19:37   ` Andy Lutomirski
  0 siblings, 0 replies; 3+ messages in thread
From: Andy Lutomirski @ 2016-01-19 19:37 UTC (permalink / raw)


On Tue, Jan 19, 2016@6:44 AM, Matthew Wilcox <willy@linux.intel.com> wrote:
> On Mon, Jan 18, 2016@03:23:31PM -0800, Andy Lutomirski wrote:
>> Also, the host memory buffer feature seems related, although I can't
>> find anything in the spec saying what its purpose is.  Is it related
>> to the power management features?  Does it give faster low-power
>> exits?
>
> The host memory buffer exists because some bright spark working on a
> drive noticed that it's significantly quicker & higher bandwidth to store
> various data in host DRAM than it is to store them on the drive's flash.
> So as long as they can twist our arms into allocating host DRAM for
> them and tolerate the fact that the contents of the host memory buffer
> go away at power-loss, they're going to store all kinds of things there
> that they don't want to keep in the drive's own DRAM.
>
> So yes, the HMB may well be used by the drive to store the (hopefully
> encrypted) contents of its own DRAM during low-power states where it
> wants to power down its DRAM, but it may also be used during regular
> operation for other things.

This scares me a bit.

Suppose I own an nvme device, I enable HMB, and the power fails.
Suppose further that it's a reasonable quality part with power-fail
caps.  How much do we believe that the power-fail code won't try to
access the HMB?

Also, all of the slow-but-operational power states seem semi-useless.
They don't tell us how slow they are except in the "I am slower than
this other state" sense.

Maybe I'll try to implement some basic control over the autonomous
transition policy in the driver.  That's a lot less work than getting
D3 transitions to work without blowing up the driver state or taking
forever to wake back up and restore all the queues.

--Andy

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-01-19 19:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-18 23:23 Anyone working on nvme power management? Andy Lutomirski
2016-01-19 14:44 ` Matthew Wilcox
2016-01-19 19:37   ` Andy Lutomirski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.