[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190510135139.GE9675@localhost.localdomain>
Date: Fri, 10 May 2019 07:51:39 -0600
From: Keith Busch <kbusch@...nel.org>
To: Christoph Hellwig <hch@....de>
Cc: "Mario.Limonciello@...l.com" <Mario.Limonciello@...l.com>,
"kai.heng.feng@...onical.com" <kai.heng.feng@...onical.com>,
"axboe@...com" <axboe@...com>,
"sagi@...mberg.me" <sagi@...mberg.me>,
"rafael@...nel.org" <rafael@...nel.org>,
"linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
"Wysocki, Rafael J" <rafael.j.wysocki@...el.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-nvme@...ts.infradead.org" <linux-nvme@...ts.infradead.org>,
"Busch, Keith" <keith.busch@...el.com>
Subject: Re: [PATCH] nvme-pci: Use non-operational power state instead of D3
on Suspend-to-Idle
On Thu, May 09, 2019 at 10:30:52PM -0700, Christoph Hellwig wrote:
> Also I don't see any reason why we'd need to do the freeze game on
> resume.
Right, definitely no reason for resume.
> Even on suspend it looks a little odd to me, as in theory
> the PM core should have already put the system into a quiescent state.
> But maybe we actually need it there, in which case a comment would
> be helpful.
I wasn't sure if suspend prevents a kthread or work queue from
running. For example, if the device sends a namespace notify AEN during
S2I, does the nvme scan_work run?
Since I wasn't sure, I took a paranoid approach to ensure nothing was
in flight, but I'd be happy if this is unnecessary.
> > + if (!pm_suspend_via_firmware())
> > + return nvme_set_power(&ndev->ctrl, 0);
>
> Don't we need to save the previous power state here and restore that?
> For example if someone set a specific state through nvme-cli?
Sure, we can do that. It would have been super if the spec had this
set feature command's CQE DW0 return the previous power state so we
could set the new and save the old in a single command, but two commands
is just a minor inconvenience.
Powered by blists - more mailing lists