[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/6] block/nvme: convert to blk_io_plug_call() API
From: |
Stefan Hajnoczi |
Subject: |
Re: [PATCH 2/6] block/nvme: convert to blk_io_plug_call() API |
Date: |
Tue, 23 May 2023 11:47:27 -0400 |
On Fri, May 19, 2023 at 10:46:25AM +0200, Stefano Garzarella wrote:
> On Wed, May 17, 2023 at 06:10:18PM -0400, Stefan Hajnoczi wrote:
> > Stop using the .bdrv_co_io_plug() API because it is not multi-queue
> > block layer friendly. Use the new blk_io_plug_call() API to batch I/O
> > submission instead.
> >
> > Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> > ---
> > block/nvme.c | 44 ++++++++++++--------------------------------
> > 1 file changed, 12 insertions(+), 32 deletions(-)
> >
> > diff --git a/block/nvme.c b/block/nvme.c
> > index 5b744c2bda..100b38b592 100644
> > --- a/block/nvme.c
> > +++ b/block/nvme.c
> > @@ -25,6 +25,7 @@
> > #include "qemu/vfio-helpers.h"
> > #include "block/block-io.h"
> > #include "block/block_int.h"
> > +#include "sysemu/block-backend.h"
> > #include "sysemu/replay.h"
> > #include "trace.h"
> >
> > @@ -119,7 +120,6 @@ struct BDRVNVMeState {
> > int blkshift;
> >
> > uint64_t max_transfer;
> > - bool plugged;
> >
> > bool supports_write_zeroes;
> > bool supports_discard;
> > @@ -282,7 +282,7 @@ static void nvme_kick(NVMeQueuePair *q)
> > {
> > BDRVNVMeState *s = q->s;
> >
> > - if (s->plugged || !q->need_kick) {
> > + if (!q->need_kick) {
> > return;
> > }
> > trace_nvme_kick(s, q->index);
> > @@ -387,10 +387,6 @@ static bool nvme_process_completion(NVMeQueuePair *q)
> > NvmeCqe *c;
> >
> > trace_nvme_process_completion(s, q->index, q->inflight);
> > - if (s->plugged) {
> > - trace_nvme_process_completion_queue_plugged(s, q->index);
>
> Should we remove "nvme_process_completion_queue_plugged(void *s,
> unsigned q_index) "s %p q #%u" from block/trace-events?
Will fix, thanks!
Stefan
signature.asc
Description: PGP signature
- [PATCH 0/6] block: add blk_io_plug_call() API, Stefan Hajnoczi, 2023/05/17
- [PATCH 2/6] block/nvme: convert to blk_io_plug_call() API, Stefan Hajnoczi, 2023/05/17
- [PATCH 3/6] block/blkio: convert to blk_io_plug_call() API, Stefan Hajnoczi, 2023/05/17
- [PATCH 4/6] block/io_uring: convert to blk_io_plug_call() API, Stefan Hajnoczi, 2023/05/17
- [PATCH 5/6] block/linux-aio: convert to blk_io_plug_call() API, Stefan Hajnoczi, 2023/05/17
- [PATCH 6/6] block: remove bdrv_co_io_plug() API, Stefan Hajnoczi, 2023/05/17