mbox series

[v2,00/15] hw/block/nvme: Support Namespace Types and Zoned Namespace Command Set

Message ID 20200912225430.1772-1-dmitry.fomichev@wdc.com
Headers show
Series hw/block/nvme: Support Namespace Types and Zoned Namespace Command Set | expand

Message

Dmitry Fomichev Sept. 12, 2020, 10:54 p.m. UTC
v1 -> v2:

 - Rebased on top of qemu-nvme/next branch.
 - Incorporated feedback from Klaus and Alistair.
 - Dropped "Simulate Zone Active excursions" patch.
   Excursion behavior may depend on the internal controller
   architecture and therefore be vendor-specific.
 - Dropped support for Zone Attributes and zoned AENs for now.
   These features can be added in a future series.
 - NS Types support is extended to handle active/inactive namespaces.
 - Update the write pointer after backing storage I/O completion, not
   before. This makes the emulation to run correctly in case of
   backing device failures.
 - Avoid division in the I/O path if the device zone size is
   a power of two (the most common case). Zone index then can be
   calculated by using bit shift.
 - A few reported bugs have been fixed.
 - Indentation in function definitions has been changed to make it
   the same as the rest of the code.


Zoned Namespace (ZNS) Command Set is a newly introduced command set
published by the NVM Express, Inc. organization as TP 4053. The main
design goals of ZNS are to provide hardware designers the means to
reduce NVMe controller complexity and to allow achieving a better I/O
latency and throughput. SSDs that implement this interface are
commonly known as ZNS SSDs.

This command set is implementing a zoned storage model, similarly to
ZAC/ZBC. As such, there is already support in Linux, allowing one to
perform the majority of tasks needed for managing ZNS SSDs.

The Zoned Namespace Command Set relies on another TP, known as
Namespace Types (NVMe TP 4056), which introduces support for having
multiple command sets per namespace.

Both ZNS and Namespace Types specifications can be downloaded by
visiting the following link -

https://nvmexpress.org/wp-content/uploads/NVM-Express-1.4-Ratified-TPs.zip

This patch series adds Namespace Types support and zoned namespace
emulation capability to the existing NVMe PCI device.

The patchset is organized as follows -

The first several patches are preparatory and are added to allow for
an easier review of the subsequent commits. The group of patches that
follows adds NS Types support with only NVM Command Set being
available. Finally, the last group of commits makes definitions and
adds new code to support Zoned Namespace Command Set.

Based-on: https://www.mail-archive.com/qemu-devel@nongnu.org/msg736817.html


*** BLURB HERE ***

Ajay Joshi (1):
  hw/block/nvme: Define 64 bit cqe.result

Dmitry Fomichev (11):
  hw/block/nvme: Report actual LBA data shift in LBAF
  hw/block/nvme: Add Commands Supported and Effects log
  hw/block/nvme: Define trace events related to NS Types
  hw/block/nvme: Make Zoned NS Command Set definitions
  hw/block/nvme: Define Zoned NS Command Set trace events
  hw/block/nvme: Support Zoned Namespace Command Set
  hw/block/nvme: Introduce max active and open zone limits
  hw/block/nvme: Support Zone Descriptor Extensions
  hw/block/nvme: Add injection of Offline/Read-Only zones
  hw/block/nvme: Use zone metadata file for persistence
  hw/block/nvme: Document zoned parameters in usage text

Niklas Cassel (3):
  hw/block/nvme: Introduce the Namespace Types definitions
  hw/block/nvme: Add support for Namespace Types
  hw/block/nvme: Add support for active/inactive namespaces

 block/nvme.c          |    2 +-
 block/trace-events    |    2 +-
 hw/block/nvme.c       | 1932 ++++++++++++++++++++++++++++++++++++++++-
 hw/block/nvme.h       |  190 ++++
 hw/block/trace-events |   38 +
 include/block/nvme.h  |  210 ++++-
 6 files changed, 2308 insertions(+), 66 deletions(-)

Comments

Klaus Jensen Sept. 15, 2020, 7:43 a.m. UTC | #1
On Sep 13 07:54, Dmitry Fomichev wrote:
> v1 -> v2:

> 

>  - Incorporated feedback from Klaus and Alistair.


Since it's been a while since I reviewed this, it would have been nice
if you had listed what feedback you incorporated ;)
Dmitry Fomichev Sept. 15, 2020, 6:55 p.m. UTC | #2
> -----Original Message-----

> From: Klaus Jensen <its@irrelevant.dk>

> Sent: Tuesday, September 15, 2020 3:44 AM

> To: Dmitry Fomichev <Dmitry.Fomichev@wdc.com>

> Cc: Keith Busch <kbusch@kernel.org>; Klaus Jensen

> <k.jensen@samsung.com>; Kevin Wolf <kwolf@redhat.com>; Philippe

> Mathieu-Daudé <philmd@redhat.com>; Maxim Levitsky

> <mlevitsky@redhat.com>; Fam Zheng <fam@euphon.net>; Niklas Cassel

> <Niklas.Cassel@wdc.com>; Damien Le Moal <Damien.LeMoal@wdc.com>;

> qemu-block@nongnu.org; qemu-devel@nongnu.org; Alistair Francis

> <Alistair.Francis@wdc.com>; Matias Bjorling <Matias.Bjorling@wdc.com>

> Subject: Re: [PATCH v2 00/15] hw/block/nvme: Support Namespace Types

> and Zoned Namespace Command Set

> 

> On Sep 13 07:54, Dmitry Fomichev wrote:

> > v1 -> v2:

> >

> >  - Incorporated feedback from Klaus and Alistair.

> 

> Since it's been a while since I reviewed this, it would have been nice

> if you had listed what feedback you incorporated ;)


I'll try to make the list and include it with v4...