public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Wu, Hao A" <hao.a.wu@intel.com>
To: "Ni, Ruiyu" <ruiyu.ni@intel.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Subject: Re: [PATCH 0/2] Notify NVME HW when system reset happens
Date: Wed, 9 Aug 2017 08:01:44 +0000	[thread overview]
Message-ID: <B80AF82E9BFB8E4FBD8C89DA810C6A0931CDA00B@SHSMSX104.ccr.corp.intel.com> (raw)
In-Reply-To: <734D49CCEBEEF84792F5B80ED585239D5B9E30A7@SHSMSX104.ccr.corp.intel.com>

> -----Original Message-----
> From: Ni, Ruiyu
> Sent: Wednesday, August 09, 2017 3:57 PM
> To: Wu, Hao A; edk2-devel@lists.01.org
> Subject: RE: [edk2] [PATCH 0/2] Notify NVME HW when system reset happens
> 
> The NVME controller requires notification for shutdown as part of its
> management of internal structures.  Even with FUA, failing to notify the NVME
> controller to shutdown power off causes the NVME controller to take quite
> some time to organize its tables on the next power on.  This time exceeds the
> normal timeout, so we would fail to boot the NVME disk.

Got it, thanks for the clarification.

> 
> I will put above explanation into the commit message as well.

The series is good to me.
Reviewed-by: Hao Wu <hao.a.wu@intel.com>


Best Regards,
Hao Wu

> 
> Thanks/Ray
> 
> > -----Original Message-----
> > From: Wu, Hao A
> > Sent: Monday, August 7, 2017 3:14 PM
> > To: Ni, Ruiyu <ruiyu.ni@intel.com>; edk2-devel@lists.01.org
> > Subject: RE: [edk2] [PATCH 0/2] Notify NVME HW when system reset
> > happens
> >
> > Hi Ray,
> >
> > Just for curiosity, I checked the NVME spec for the purpose of a shutdown
> > notification to the controller when there is a power-off for the device. And
> > found the following:
> >
> > 1. Will increase the field 'Unsafe Shutdowns' in the SMART/Health
> > Information data (Section 5.10.1.2).
> >
> > 2. Subsequent reads for locations written to the volatile write cache that
> > were not written to non-volatile storage may return older data. (Section
> > 6.4.2.1)
> >
> > For 2, the implementation of the NVME driver always sets the Force Unit
> > Access (FUA) bit for write operations. Hence, the read operation will reflect
> > the latest data on device.
> >
> > So missing the shutdown notification will increase the number of 'Unsafe
> > Shutdowns' tracked by the controller. Is there any other issue being
> > introduced by missing the notification?
> >
> > Besides, the change is good for me.
> >
> >
> > Best Regards,
> > Hao Wu
> >
> > > -----Original Message-----
> > > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
> > > Ruiyu Ni
> > > Sent: Monday, August 07, 2017 11:32 AM
> > > To: edk2-devel@lists.01.org
> > > Subject: [edk2] [PATCH 0/2] Notify NVME HW when system reset happens
> > >
> > > Per NVM Express Spec, software should notify NVME HW when shutdown
> > > occurs.
> > >
> > > The host should set the Shutdown Notification (CC.SHN) field to 01b to
> > > indicate a normal shutdown operation. The controller indicates when
> > > shutdown processing is completed by updating the Shutdown Status
> > > (CSTS.SHST) field to 10b.
> > >
> > > Ruiyu Ni (2):
> > >   MdePkg/Nvme: Add NVME shutdown notification related macros
> > >   MdeModulePkg/NvmExpressDxe: Notify NVME HW when system reset
> > happens
> > >
> > >  MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpress.c    |   7 +-
> > >  MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpress.h    |  23 ++-
> > >  .../Bus/Pci/NvmExpressDxe/NvmExpressDxe.inf        |   3 +-
> > >  MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressHci.c | 181
> > > ++++++++++++++++++++-
> > >  MdePkg/Include/IndustryStandard/Nvme.h             |   6 +-
> > >  5 files changed, 215 insertions(+), 5 deletions(-)
> > >
> > > --
> > > 2.12.2.windows.2
> > >
> > > _______________________________________________
> > > edk2-devel mailing list
> > > edk2-devel@lists.01.org
> > > https://lists.01.org/mailman/listinfo/edk2-devel


      reply	other threads:[~2017-08-09  7:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-07  3:31 [PATCH 0/2] Notify NVME HW when system reset happens Ruiyu Ni
2017-08-07  3:31 ` [PATCH 1/2] MdePkg/Nvme: Add NVME shutdown notification related macros Ruiyu Ni
2017-08-07  3:31 ` [PATCH 2/2] MdeModulePkg/NvmExpressDxe: Notify NVME HW when system reset happens Ruiyu Ni
2017-08-07  7:14 ` [PATCH 0/2] " Wu, Hao A
2017-08-09  7:56   ` Ni, Ruiyu
2017-08-09  8:01     ` Wu, Hao A [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=B80AF82E9BFB8E4FBD8C89DA810C6A0931CDA00B@SHSMSX104.ccr.corp.intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox