mbox series

[v2,00/11] hw/nvme: reimplement all multi-aio commands with custom aiocbs

Message ID 20210617190657.110823-1-its@irrelevant.dk (mailing list archive)
Headers show
Series hw/nvme: reimplement all multi-aio commands with custom aiocbs | expand

Message

Klaus Jensen June 17, 2021, 7:06 p.m. UTC
From: Klaus Jensen <k.jensen@samsung.com>

This series reimplements flush, dsm, copy, zone reset and format nvm to
allow cancellation. I posted an RFC back in March ("hw/block/nvme:
convert ad-hoc aio tracking to aiocb") and I've applied some feedback
from Stefan and reimplemented the remaining commands.

The basic idea is to define custom AIOCBs for these commands. The custom
AIOCB takes care of issuing all the "nested" AIOs one by one instead of
blindly sending them off simultaneously without tracking the returned
aiocbs.

v2:
  - dropped RFC
  - fixed flush cancel from being unintentially a noop (Vladimir)

Klaus Jensen (11):
  hw/nvme: reimplement flush to allow cancellation
  hw/nvme: add nvme_block_status_all helper
  hw/nvme: reimplement dsm to allow cancellation
  hw/nvme: save reftag when generating pi
  hw/nvme: remove assert from nvme_get_zone_by_slba
  hw/nvme: use prinfo directly in nvme_check_prinfo and nvme_dif_check
  hw/nvme: add dw0/1 to the req completion trace event
  hw/nvme: reimplement the copy command to allow aio cancellation
  hw/nvme: reimplement zone reset to allow cancellation
  hw/nvme: reimplement format nvm to allow cancellation
  Partially revert "hw/block/nvme: drain namespaces on sq deletion"

 hw/nvme/nvme.h       |   10 +-
 include/block/nvme.h |    8 +
 hw/nvme/ctrl.c       | 1883 ++++++++++++++++++++++++------------------
 hw/nvme/dif.c        |   64 +-
 hw/nvme/trace-events |   21 +-
 5 files changed, 1124 insertions(+), 862 deletions(-)

Comments

Keith Busch June 25, 2021, 6:47 p.m. UTC | #1
On Thu, Jun 17, 2021 at 09:06:46PM +0200, Klaus Jensen wrote:
> From: Klaus Jensen <k.jensen@samsung.com>
> 
> This series reimplements flush, dsm, copy, zone reset and format nvm to
> allow cancellation. I posted an RFC back in March ("hw/block/nvme:
> convert ad-hoc aio tracking to aiocb") and I've applied some feedback
> from Stefan and reimplemented the remaining commands.
> 
> The basic idea is to define custom AIOCBs for these commands. The custom
> AIOCB takes care of issuing all the "nested" AIOs one by one instead of
> blindly sending them off simultaneously without tracking the returned
> aiocbs.


Klaus,

THis series looks good to me.

Reviewed-by: Keith Busch <kbusch@kernel.org>
Klaus Jensen June 28, 2021, 5:08 p.m. UTC | #2
On Jun 17 21:06, Klaus Jensen wrote:
>From: Klaus Jensen <k.jensen@samsung.com>
>
>This series reimplements flush, dsm, copy, zone reset and format nvm to
>allow cancellation. I posted an RFC back in March ("hw/block/nvme:
>convert ad-hoc aio tracking to aiocb") and I've applied some feedback
>from Stefan and reimplemented the remaining commands.
>
>The basic idea is to define custom AIOCBs for these commands. The custom
>AIOCB takes care of issuing all the "nested" AIOs one by one instead of
>blindly sending them off simultaneously without tracking the returned
>aiocbs.
>
>v2:
>  - dropped RFC
>  - fixed flush cancel from being unintentially a noop (Vladimir)
>
>Klaus Jensen (11):
>  hw/nvme: reimplement flush to allow cancellation
>  hw/nvme: add nvme_block_status_all helper
>  hw/nvme: reimplement dsm to allow cancellation
>  hw/nvme: save reftag when generating pi
>  hw/nvme: remove assert from nvme_get_zone_by_slba
>  hw/nvme: use prinfo directly in nvme_check_prinfo and nvme_dif_check
>  hw/nvme: add dw0/1 to the req completion trace event
>  hw/nvme: reimplement the copy command to allow aio cancellation
>  hw/nvme: reimplement zone reset to allow cancellation
>  hw/nvme: reimplement format nvm to allow cancellation
>  Partially revert "hw/block/nvme: drain namespaces on sq deletion"
>
> hw/nvme/nvme.h       |   10 +-
> include/block/nvme.h |    8 +
> hw/nvme/ctrl.c       | 1883 ++++++++++++++++++++++++------------------
> hw/nvme/dif.c        |   64 +-
> hw/nvme/trace-events |   21 +-
> 5 files changed, 1124 insertions(+), 862 deletions(-)
>
>-- 
>2.32.0
>

Applied to nvme-next.