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: Mon, 7 Aug 2017 07:14:14 +0000	[thread overview]
Message-ID: <B80AF82E9BFB8E4FBD8C89DA810C6A0931CD14B6@SHSMSX104.ccr.corp.intel.com> (raw)
In-Reply-To: <20170807033142.177248-1-ruiyu.ni@intel.com>

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


  parent reply	other threads:[~2017-08-07  7:13 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 ` Wu, Hao A [this message]
2017-08-09  7:56   ` [PATCH 0/2] " Ni, Ruiyu
2017-08-09  8:01     ` Wu, Hao A

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=B80AF82E9BFB8E4FBD8C89DA810C6A0931CD14B6@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