lkml.org 
[lkml]   [2019]   [May]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] nvme-pci: Use non-operational power state instead of D3 on Suspend-to-Idle
On Thu, May 09, 2019 at 09:37:58PM +0000, Mario.Limonciello@dell.com wrote:
> > +int nvme_set_power(struct nvme_ctrl *ctrl, unsigned npss)
> > +{
> > + int ret;
> > +
> > + mutex_lock(&ctrl->scan_lock);
> > + nvme_start_freeze(ctrl);
> > + nvme_wait_freeze(ctrl);
> > + ret = nvme_set_features(ctrl, NVME_FEAT_POWER_MGMT, npss, NULL, 0,
> > + NULL);
> > + nvme_unfreeze(ctrl);
> > + mutex_unlock(&ctrl->scan_lock);
> > +
> > + return ret;
> > +}
> > +EXPORT_SYMBOL_GPL(nvme_set_power);
>
> I believe without memory barriers at the end disks with HMB this will
> still kernel panic (Such as Toshiba BG3).

Well, the mutex has an implied memory barrier, but your HMB explanation
doesn't make much sense to me anyway. The "mb()" in this thread's original
patch is a CPU memory barrier, and the CPU had better not be accessing
HMB memory. Is there something else going on here?

> This still allows D3 which we found at least failed to go into deepest state and blocked
> platform s0ix for the following SSDs (maybe others):
> Hynix PC601
> LiteOn CL1

We usually write features to spec first, then quirk non-compliant
devices after.

\
 
 \ /
  Last update: 2019-05-10 00:00    [W:0.137 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site