[v3,00/16] block/nvme: Various cleanups required to use multiple queues
mbox series

Message ID 20200704213051.19749-1-philmd@redhat.com
Headers show
Series
  • block/nvme: Various cleanups required to use multiple queues
Related show

Message

Philippe Mathieu-Daudé July 4, 2020, 9:30 p.m. UTC
Hi,

This series is mostly code rearrangement (cleanups) to be
able to split the hardware code from the block driver code,
to be able to use multiple queues on the same hardware, or
multiple block drivers on the same hardware.

Missing review: 5, 6, 14, 15 and 16.

Since v2:
- addressed stefanha review comments
- added 4 trivial patches (to simplify the last one)
- register IRQ notifier for each queuepair (admin and io)

Since v1:
- rebased
- use SCALE_MS definition
- added Stefan's R-b
- addressed Stefan's review comments
  - use union { NvmeIdCtrl / NvmeIdNs }
  - move irq_notifier to NVMeQueuePair
  - removed patches depending on "a tracable hardware stateo
    object instead of BDRVNVMeState".

Please review,

Phil.

$ git backport-diff -u v2
Key:
[----] : patches are identical
[####] : number of functional differences between upstream/downstream patch
[down] : patch is downstream-only
The flags [FC] indicate (F)unctional and (C)ontextual differences, respectively

001/16:[----] [--] 'block/nvme: Replace magic value by SCALE_MS definition'
002/16:[----] [--] 'block/nvme: Avoid further processing if trace event not enabled'
003/16:[----] [--] 'block/nvme: Let nvme_create_queue_pair() fail gracefully'
004/16:[----] [--] 'block/nvme: Define QUEUE_INDEX macros to ease code review'
005/16:[down] 'block/nvme: Improve error message when IO queue creation failed'
006/16:[down] 'block/nvme: Use common error path in nvme_add_io_queue()'
007/16:[----] [--] 'block/nvme: Rename local variable'
008/16:[----] [--] 'block/nvme: Use union of NvmeIdCtrl / NvmeIdNs structures'
009/16:[----] [--] 'block/nvme: Replace qemu_try_blockalign0 by qemu_try_blockalign/memset'
010/16:[----] [--] 'block/nvme: Replace qemu_try_blockalign(bs) by qemu_try_memalign(pg_sz)'
011/16:[----] [--] 'block/nvme: Simplify nvme_init_queue() arguments'
012/16:[----] [--] 'block/nvme: Replace BDRV_POLL_WHILE by AIO_WAIT_WHILE'
013/16:[----] [--] 'block/nvme: Simplify nvme_create_queue_pair() arguments'
014/16:[down] 'block/nvme: Extract nvme_poll_queue()'
015/16:[down] 'block/nvme: Move nvme_poll_cb() earlier'
016/16:[0039] [FC] 'block/nvme: Use per-queue AIO context'

Philippe Mathieu-Daudé (16):
  block/nvme: Replace magic value by SCALE_MS definition
  block/nvme: Avoid further processing if trace event not enabled
  block/nvme: Let nvme_create_queue_pair() fail gracefully
  block/nvme: Define QUEUE_INDEX macros to ease code review
  block/nvme: Improve error message when IO queue creation failed
  block/nvme: Use common error path in nvme_add_io_queue()
  block/nvme: Rename local variable
  block/nvme: Use union of NvmeIdCtrl / NvmeIdNs structures
  block/nvme: Replace qemu_try_blockalign0 by qemu_try_blockalign/memset
  block/nvme: Replace qemu_try_blockalign(bs) by
    qemu_try_memalign(pg_sz)
  block/nvme: Simplify nvme_init_queue() arguments
  block/nvme: Replace BDRV_POLL_WHILE by AIO_WAIT_WHILE
  block/nvme: Simplify nvme_create_queue_pair() arguments
  block/nvme: Extract nvme_poll_queue()
  block/nvme: Move nvme_poll_cb() earlier
  block/nvme: Use per-queuepair IRQ notifier and AIO context

 block/nvme.c | 268 ++++++++++++++++++++++++++++-----------------------
 1 file changed, 148 insertions(+), 120 deletions(-)