mbox series

[RFC,0/4] hw/block/nvme: convert ad-hoc aio tracking to aiocbs

Message ID 20210302111040.289244-1-its@irrelevant.dk (mailing list archive)
Headers show
Series hw/block/nvme: convert ad-hoc aio tracking to aiocbs | expand

Message

Klaus Jensen March 2, 2021, 11:10 a.m. UTC
From: Klaus Jensen <k.jensen@samsung.com>

The nvme device currently uses an ad-hoc approach to tracking AIO
completion when a request results in multiple issued AIOs.

This series convert those operations (DSM, Copy, Flush and Zone Reset)
to use "proper" QEMU AIOCB processing instead. This requires more code,
but the end result of this is that we gain proper cancellation support
(something that the device would not do correctly in the existing ad-hoc
approach, and something that would have required more code anyway).

This series makes SQ deletions "just work" and allows Abort to be
implemented such that it actually does something.

Marking RFC, since I've not really done anything with QEMU AIOs and BHs
on this level before, so I'd really like some block-layer eyes on it.

Klaus Jensen (4):
  hw/block/nvme: convert dsm to aiocb
  hw/block/nvme: convert copy to aiocb
  hw/block/nvme: convert flush to aiocb
  hw/block/nvme: convert zone reset to aiocb

 hw/block/nvme.c       | 945 ++++++++++++++++++++++++------------------
 hw/block/trace-events |   2 +-
 2 files changed, 537 insertions(+), 410 deletions(-)

Comments

Stefan Hajnoczi March 8, 2021, 4:38 p.m. UTC | #1
On Tue, Mar 02, 2021 at 12:10:36PM +0100, Klaus Jensen wrote:
> Marking RFC, since I've not really done anything with QEMU AIOs and BHs
> on this level before, so I'd really like some block-layer eyes on it.

I took a brief look and it seems like a nice conversion of the code.

Stefan