[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH RFC v5 12/12] hw/block/nvme: add persistence for zone info
From: |
Stefan Hajnoczi |
Subject: |
Re: [PATCH RFC v5 12/12] hw/block/nvme: add persistence for zone info |
Date: |
Mon, 30 Nov 2020 12:33:00 +0000 |
On Fri, Nov 27, 2020 at 12:46:01AM +0100, Klaus Jensen wrote:
> From: Klaus Jensen <k.jensen@samsung.com>
>
> Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
> ---
> docs/specs/nvme.txt | 15 +++
> hw/block/nvme-ns.h | 16 ++++
> hw/block/nvme-ns.c | 212 +++++++++++++++++++++++++++++++++++++++++-
> hw/block/nvme.c | 87 +++++++++++++++++
> hw/block/trace-events | 2 +
> 5 files changed, 331 insertions(+), 1 deletion(-)
>
> diff --git a/docs/specs/nvme.txt b/docs/specs/nvme.txt
> index 03bb4d9516b4..05d81c88ad4e 100644
> --- a/docs/specs/nvme.txt
> +++ b/docs/specs/nvme.txt
> @@ -20,6 +20,21 @@ The nvme device (-device nvme) emulates an NVM Express
> Controller.
> `zns.mor`; Specifies the number of open resources available. This is a 0s
> based value.
>
> + `zns.pstate`; This parameter specifies another blockdev to be used for
> + storing zone state persistently.
> +
> + -drive id=zns-pstate,file=zns-pstate.img,format=raw
> + -device nvme-ns,zns.pstate=zns-pstate,...
> +
> + To reset (or initialize) state, the blockdev image should be of zero
> size:
> +
> + qemu-img create -f raw zns-pstate.img 0
> +
> + The image will be intialized with a file format header and truncated to
> + the required size. If the pstate given is of non-zero size, it will be
> + assumed to already contain zone state information and the header will be
> + checked.
In principle this makes sense but at first glance it looks like the code
is synchronous - it blocks the vCPU if zone metadata I/O is necessary.
That works for test/bring-up code but can't be used in production due to
the performance impact.
Is the expectation that the QEMU NVMe device emulation will only be used
for test/bring-up now and in the future?
Stefan
signature.asc
Description: PGP signature
- [PATCH v5 01/12] hw/block/nvme: Separate read and write handlers, (continued)
- [PATCH v5 01/12] hw/block/nvme: Separate read and write handlers, Klaus Jensen, 2020/11/26
- [PATCH v5 02/12] hw/block/nvme: Merge nvme_write_zeroes() with nvme_write(), Klaus Jensen, 2020/11/26
- [PATCH v5 04/12] hw/block/nvme: Generate namespace UUIDs, Klaus Jensen, 2020/11/26
- [PATCH v5 03/12] hw/block/nvme: add commands supported and effects log page, Klaus Jensen, 2020/11/26
- [PATCH v5 05/12] hw/block/nvme: support namespace types, Klaus Jensen, 2020/11/26
- [PATCH v5 07/12] hw/block/nvme: add the zone management receive command, Klaus Jensen, 2020/11/26
- [PATCH v5 09/12] hw/block/nvme: add the zone append command, Klaus Jensen, 2020/11/26
- [PATCH v5 06/12] hw/block/nvme: add basic read/write for zoned namespaces, Klaus Jensen, 2020/11/26
- [PATCH v5 08/12] hw/block/nvme: add the zone management send command, Klaus Jensen, 2020/11/26
- [PATCH RFC v5 12/12] hw/block/nvme: add persistence for zone info, Klaus Jensen, 2020/11/26
- Re: [PATCH RFC v5 12/12] hw/block/nvme: add persistence for zone info,
Stefan Hajnoczi <=
- [PATCH v5 11/12] hw/block/nvme: allow open to close zone transitions by controller, Klaus Jensen, 2020/11/26
- [PATCH v5 10/12] hw/block/nvme: track and enforce zone resources, Klaus Jensen, 2020/11/26