-
> drivers/block/virtio_blk.c | 13 +++--
> 1 file changed, 3 insertions(+), 10 deletions(-)
Reviewed-by: Stefan Hajnoczi
signature.asc
Description: PGP signature
The term "iothread lock" is obsolete. The APIs use Big QEMU Lock (BQL)
in their names. Update the code comments to use "BQL" instead of
"iothread lock".
Signed-off-by: Stefan Hajnoczi
Reviewed-by: Philippe Mathieu-Daudé
Reviewed-by: Paul Durrant
Reviewed-by: Akih
The term "QEMU global mutex" is identical to the more widely used Big
QEMU Lock ("BQL"). Update the code comments and documentation to use
"BQL" instead of "QEMU global mutex".
Signed-off-by: Stefan Hajnoczi
Acked-by: Markus Armbruster
Reviewed-by: P
The name "iothread" is overloaded. Use the term Big QEMU Lock (BQL)
instead, it is already widely used and unambiguous.
Signed-off-by: Stefan Hajnoczi
Reviewed-by: Paul Durrant
Acked-by: David Woodhouse
Reviewed-by: Cédric Le Goater
Acked-by: Ilya Leoshkevich
Reviewed-by: Harsh Pr
The name "iothread" is overloaded. Use the term Big QEMU Lock (BQL)
instead, it is already widely used and unambiguous.
Signed-off-by: Stefan Hajnoczi
Reviewed-by: Cédric Le Goater
Reviewed-by: Philippe Mathieu-Daudé
Reviewed-by: Paul Durrant
Reviewed-by: Harsh Prateek Bora
R
mments and documentation that will be
updated in later patches.
Signed-off-by: Stefan Hajnoczi
Reviewed-by: Paul Durrant
Acked-by: Fabiano Rosas
Acked-by: David Woodhouse
Reviewed-by: Cédric Le Goater
Acked-by: Peter Xu
Acked-by: Eric Farman
Reviewed-by: Harsh Prateek Bora
Acked-by: Hyman
ter
Signed-off-by: Stefan Hajnoczi
Message-ID: <20231120171806.19361-1-phi...@linaro.org>
---
include/block/aio.h | 3 +--
iothread.c | 3 +--
util/aio-posix.c| 3 +--
util/aio-win32.c| 3 +--
util/main-loop.c| 5 +
5 files changed, 5 insertions(+), 12 deletions(-)
-
Pull request
Philippe Mathieu-Daudé (1):
iothread: Remove unused Error** argument in aio_context_set_aio_params
Stefan Hajnoczi (5):
system/cpus: rename qemu_mutex_lock_iothread() to bql_lock()
qemu/main-loop: rename QEMU_IOTHREAD_LOCK_GUARD to BQL_LOCK_
On Tue, Jan 02, 2024 at 10:35:24AM -0500, Stefan Hajnoczi wrote:
> v3:
> - Rebase
> - Define bql_lock() macro on a single line [Akihiko Odaki]
> v2:
> - Rename APIs bql_*() [PeterX]
> - Spell out "Big QEMU Lock (BQL)" in doc comments [PeterX]
> - Rename "i
mments and documentation that will be
updated in later patches.
Signed-off-by: Stefan Hajnoczi
Reviewed-by: Paul Durrant
Acked-by: Fabiano Rosas
Acked-by: David Woodhouse
Reviewed-by: Cédric Le Goater
Acked-by: Peter Xu
Acked-by: Eric Farman
Reviewed-by: Harsh Prateek Bora
Acked-b
The term "QEMU global mutex" is identical to the more widely used Big
QEMU Lock ("BQL"). Update the code comments and documentation to use
"BQL" instead of "QEMU global mutex".
Signed-off-by: Stefan Hajnoczi
Acked-by: Markus Armbruster
Reviewed-by: Phili
The name "iothread" is overloaded. Use the term Big QEMU Lock (BQL)
instead, it is already widely used and unambiguous.
Signed-off-by: Stefan Hajnoczi
Reviewed-by: Paul Durrant
Acked-by: David Woodhouse
Reviewed-by: Cédric Le Goater
Acked-by: Ilya Leoshkevich
---
include/qemu/m
The term "iothread lock" is obsolete. The APIs use Big QEMU Lock (BQL)
in their names. Update the code comments to use "BQL" instead of
"iothread lock".
Signed-off-by: Stefan Hajnoczi
Reviewed-by: Philippe Mathieu-Daudé
---
docs/devel/reset.rst
The name "iothread" is overloaded. Use the term Big QEMU Lock (BQL)
instead, it is already widely used and unambiguous.
Signed-off-by: Stefan Hajnoczi
Reviewed-by: Cédric Le Goater
Reviewed-by: Philippe Mathieu-Daudé
---
include/qemu/main-loop.h | 10 +-
accel/tcg
t; is easily confused with the unrelated --object
iothread (iothread.c).
This series updates the code and documentation to consistently use "BQL". This
makes the code easier to understand.
Stefan Hajnoczi (5):
system/cpus: rename qemu_mutex_lock_iothread() to bql_lock()
qem
On Wed, Dec 13, 2023 at 03:37:00PM +0900, Akihiko Odaki wrote:
> On 2023/12/13 0:39, Stefan Hajnoczi wrote:
> > @@ -312,58 +312,58 @@ bool qemu_in_main_thread(void);
> > } while (0)
> > /**
> > - * qemu_mutex_lock_iothread: Lock the main loop mutex.
> > + *
On Tue, 19 Dec 2023 at 13:20, Kevin Wolf wrote:
>
> Am 19.12.2023 um 16:28 hat Kevin Wolf geschrieben:
> > Am 05.12.2023 um 19:20 hat Stefan Hajnoczi geschrieben:
> > > aio_context_acquire()/aio_context_release() has been replaced by
> > > fine-grained locking to pr
On Wed, 20 Dec 2023 at 04:32, Kevin Wolf wrote:
>
> Am 19.12.2023 um 22:23 hat Stefan Hajnoczi geschrieben:
> > The following hack makes the test pass but there are larger safety
> > issues that I'll need to look at on Wednesday:
>
> I see, you're taking the
The following hack makes the test pass but there are larger safety
issues that I'll need to look at on Wednesday:
diff --git a/nbd/server.c b/nbd/server.c
index 895cf0a752..cf4b7d5c6d 100644
--- a/nbd/server.c
+++ b/nbd/server.c
@@ -1617,7 +1617,7 @@ static void nbd_drained_begin(void *opaque)
On Tue, 19 Dec 2023 at 10:59, Kevin Wolf wrote:
>
> Am 05.12.2023 um 19:20 hat Stefan Hajnoczi geschrieben:
> > This is the big patch that removes
> > aio_context_acquire()/aio_context_release() from the block layer and
> > affected block layer users.
> >
> > T
On Tue, 12 Dec 2023 at 11:02, Volodymyr Babchuk
wrote:
>
>
> Hi Stefan,
>
> Stefan Hajnoczi writes:
>
> > On Tue, 12 Dec 2023 at 10:36, Volodymyr Babchuk
> > wrote:
> >>
> >> Hi Anthony
> >>
> >> Anthony PERARD writes:
> &
On Tue, 12 Dec 2023 at 10:36, Volodymyr Babchuk
wrote:
>
> Hi Anthony
>
> Anthony PERARD writes:
>
> > On Fri, Dec 08, 2023 at 02:49:27PM -0800, Stefano Stabellini wrote:
> >> On Fri, 8 Dec 2023, Daniel P. Berrangé wrote:
> >> > On Thu, Dec 07, 2023 at 11:12:48PM +, Michael Young wrote:
> >>
The term "QEMU global mutex" is identical to the more widely used Big
QEMU Lock ("BQL"). Update the code comments and documentation to use
"BQL" instead of "QEMU global mutex".
Signed-off-by: Stefan Hajnoczi
Acked-by: Markus Armbruster
Reviewed-by: Phili
The name "iothread" is overloaded. Use the term Big QEMU Lock (BQL)
instead, it is already widely used and unambiguous.
Signed-off-by: Stefan Hajnoczi
Reviewed-by: Paul Durrant
Acked-by: David Woodhouse
Reviewed-by: Cédric Le Goater
Acked-by: Ilya Leoshkevich
---
include/qemu/m
The term "iothread lock" is obsolete. The APIs use Big QEMU Lock (BQL)
in their names. Update the code comments to use "BQL" instead of
"iothread lock".
Signed-off-by: Stefan Hajnoczi
Reviewed-by: Philippe Mathieu-Daudé
---
docs/devel/reset.rst
mments and documentation that will be
updated in later patches.
Signed-off-by: Stefan Hajnoczi
Reviewed-by: Paul Durrant
Acked-by: Fabiano Rosas
Acked-by: David Woodhouse
Reviewed-by: Cédric Le Goater
Acked-by: Peter Xu
Acked-by: Eric Farman
Reviewed-by: Harsh Prateek Bora
---
include/b
.
This series updates the code and documentation to consistently use "BQL". This
makes the code easier to understand.
Stefan Hajnoczi (5):
system/cpus: rename qemu_mutex_lock_iothread() to bql_lock()
qemu/main-loop: rename QEMU_IOTHREAD_LOCK_GUARD to BQL_LOCK_GUARD
qemu/main-loop: re
The name "iothread" is overloaded. Use the term Big QEMU Lock (BQL)
instead, it is already widely used and unambiguous.
Signed-off-by: Stefan Hajnoczi
Reviewed-by: Cédric Le Goater
Reviewed-by: Philippe Mathieu-Daudé
---
include/qemu/main-loop.h | 10 +-
accel/tcg
On Fri, Dec 01, 2023 at 10:42:43AM +0530, Harsh Prateek Bora wrote:
> On 11/30/23 02:56, Stefan Hajnoczi wrote:
> > diff --git a/hw/remote/mpqemu-link.c b/hw/remote/mpqemu-link.c
> > index 9bd98e8219..ffb2c25145 100644
> > --- a/hw/remote/mpqemu-link.c
> > ++
substance
unchanged and just removed mention of the AioContext.
Signed-off-by: Stefan Hajnoczi
Reviewed-by: Eric Blake
---
include/block/block-common.h | 3 --
include/block/block-io.h | 9 ++--
include/block/block_int-common.h | 2 -
block.c
The AioContext lock no longer exists.
Signed-off-by: Stefan Hajnoczi
Reviewed-by: Eric Blake
---
include/qemu/job.h | 20
1 file changed, 20 deletions(-)
diff --git a/include/qemu/job.h b/include/qemu/job.h
index e502787dd8..9ea98b5927 100644
--- a/include/qemu/job.h
Encourage the use of locking primitives and stop mentioning the
AioContext lock since it is being removed.
Signed-off-by: Stefan Hajnoczi
Reviewed-by: Eric Blake
---
docs/devel/multiple-iothreads.txt | 45 +++
1 file changed, 15 insertions(+), 30 deletions(-)
diff
everyone who helped with this effort,
including Eric Blake, code reviewer extraordinaire, and others who I've
forgotten to mention.
Signed-off-by: Stefan Hajnoczi
Reviewed-by: Eric Blake
---
include/block/aio.h | 17 -
util/async.c| 10 --
2 files changed,
The bdrv_co_lock() and bdrv_co_unlock() functions are already no-ops.
Remove them.
Signed-off-by: Stefan Hajnoczi
---
include/block/block-global-state.h | 14 --
block.c| 10 --
blockdev.c | 4
3 files changed, 28
The SCSI subsystem no longer uses the AioContext lock. Request
processing runs exclusively in the BlockBackend's AioContext since
"scsi: only access SCSIDevice->requests from one thread" and hence the
lock is unnecessary.
Signed-off-by: Stefan Hajnoczi
Reviewed-by: Eric Blake
Stop acquiring/releasing the AioContext lock in
bdrv_graph_wrlock()/bdrv_graph_unlock() since the lock no longer has any
effect.
The distinction between bdrv_graph_wrunlock() and
bdrv_graph_wrunlock_ctx() becomes meaningless and they can be collapsed
into one function.
Signed-off-by: Stefan
Now that the AioContext lock no longer exists, AIO_WAIT_WHILE() and
AIO_WAIT_WHILE_UNLOCKED() are equivalent.
A future patch will get rid of AIO_WAIT_WHILE_UNLOCKED().
Signed-off-by: Stefan Hajnoczi
Reviewed-by: Eric Blake
---
include/block/aio-wait.h | 16
1 file changed, 4
The aio_context_acquire() API is being removed. Drop the test case that
calls the API.
Signed-off-by: Stefan Hajnoczi
Reviewed-by: Eric Blake
Reviewed-by: Kevin Wolf
---
tests/unit/test-aio.c | 67 +--
1 file changed, 1 insertion(+), 66 deletions
The AioContext lock no longer has any effect. Remove it.
Signed-off-by: Stefan Hajnoczi
Reviewed-by: Eric Blake
---
include/hw/virtio/virtio-scsi.h | 14 --
hw/scsi/scsi-bus.c | 2 --
hw/scsi/scsi-disk.c | 31 +--
hw/scsi/virtio
Since the removal of AioContext locking, the correctness of the code
relies on running requests from a single AioContext at any given time.
Add assertions that verify that callbacks are invoked in the correct
AioContext.
Signed-off-by: Stefan Hajnoczi
---
hw/scsi/scsi-disk.c | 14
incrementally.
I have performed "make check" and qemu-iotests stress tests across
x86-64, ppc64le, and aarch64 to confirm that there are no failures as a
result of eliminating the lock.
Signed-off-by: Stefan Hajnoczi
Reviewed-by: Eric Blake
Acked-by: Kevin Wolf
---
util/async.c | 4 ++
aio_wait_bh_oneshot().
This avoids more locking to protect the virtqueue and SCSI layer state.
Signed-off-by: Stefan Hajnoczi
Reviewed-by: Eric Blake
Reviewed-by: Kevin Wolf
---
include/hw/virtio/virtio-scsi.h | 3 +-
hw/scsi/virtio-scsi.c | 62 ++---
2 files changed
e no instances of case 2 left. If you see
one, you've found a bug in this patch series!
Patches 11-14 remove comments.
Based-on: 20231204164259.1515217-1-stefa...@redhat.com ("[PATCH v2 0/4] scsi:
eliminate AioContext lock")
Since SCSI needs to stop relying on the AioContext lock
On Thu, Nov 30, 2023 at 03:31:37PM -0600, Eric Blake wrote:
> On Wed, Nov 29, 2023 at 02:55:46PM -0500, Stefan Hajnoczi wrote:
> > This is the big patch that removes
> > aio_context_acquire()/aio_context_release() from the block layer and
> > affected block layer users.
&
On Mon, Dec 04, 2023 at 01:23:09PM +0100, Kevin Wolf wrote:
> Am 29.11.2023 um 20:55 hat Stefan Hajnoczi geschrieben:
> > The AioContext lock no longer has any effect. Remove it.
> >
> > Signed-off-by: Stefan Hajnoczi
> > ---
> > include/hw/virtio/virtio-scsi.h
On Mon, Dec 04, 2023 at 03:33:57PM +0100, Kevin Wolf wrote:
> Am 29.11.2023 um 20:55 hat Stefan Hajnoczi geschrieben:
> > This is the big patch that removes
> > aio_context_acquire()/aio_context_release() from the block layer and
> > affected block layer users.
> >
>
On Mon, Dec 04, 2023 at 01:46:13PM +0100, Kevin Wolf wrote:
> Am 29.11.2023 um 20:55 hat Stefan Hajnoczi geschrieben:
> > Protect the Task Management Function BH state with a lock. The TMF BH
> > runs in the main loop thread. An IOThread might process a TMF at the
> > same
On Thu, Nov 30, 2023 at 09:25:52AM -0600, Eric Blake wrote:
> On Wed, Nov 29, 2023 at 02:55:42PM -0500, Stefan Hajnoczi wrote:
> > Protect the Task Management Function BH state with a lock. The TMF BH
> > runs in the main loop thread. An IOThread might process a TMF at the
> >
On Thu, Nov 30, 2023 at 03:08:49PM -0500, Peter Xu wrote:
> On Wed, Nov 29, 2023 at 04:26:20PM -0500, Stefan Hajnoczi wrote:
> > The Big QEMU Lock (BQL) has many names and they are confusing. The
> > actual QemuMutex variable is called qemu_global_mutex but it's commonly
> &
On Thu, Nov 30, 2023 at 02:49:48PM +0100, Philippe Mathieu-Daudé wrote:
> On 29/11/23 22:26, Stefan Hajnoczi wrote:
> > The term "QEMU global mutex" is identical to the more widely used Big
> > QEMU Lock ("BQL"). Update the code comments and documentation to us
On Thu, Nov 30, 2023 at 02:47:49PM +0100, Philippe Mathieu-Daudé wrote:
> Hi Stefan,
>
> On 29/11/23 22:26, Stefan Hajnoczi wrote:
> > The term "iothread lock" is obsolete. The APIs use Big QEMU Lock (BQL)
> > in their names. Update the code comments to use &quo
On Thu, Nov 30, 2023 at 02:44:07PM +0100, Philippe Mathieu-Daudé wrote:
> Hi Stefan,
>
> On 29/11/23 22:26, Stefan Hajnoczi wrote:
> > The APIs using qemu_global_mutex now follow the Big QEMU Lock (BQL)
> > nomenclature. It's a little strange that the actual QemuMutex
On Thu, Nov 30, 2023 at 10:14:47AM +0100, Ilya Leoshkevich wrote:
> On Wed, 2023-11-29 at 16:26 -0500, Stefan Hajnoczi wrote:
> > The name "iothread" is overloaded. Use the term Big QEMU Lock (BQL)
> > instead, it is already widely used and unambiguous.
> >
>
here are also comments and documentation that will be
updated in later patches.
Signed-off-by: Stefan Hajnoczi
---
include/block/aio-wait.h | 2 +-
include/qemu/main-loop.h | 26 +++---
accel/accel-blocker.c| 10 +--
accel/dummy-cpus.c
The term "QEMU global mutex" is identical to the more widely used Big
QEMU Lock ("BQL"). Update the code comments and documentation to use
"BQL" instead of "QEMU global mutex".
Signed-off-by: Stefan Hajnoczi
---
docs/devel/multi-thread-tcg.rst |
The name "iothread" is overloaded. Use the term Big QEMU Lock (BQL)
instead, it is already widely used and unambiguous.
Signed-off-by: Stefan Hajnoczi
---
include/qemu/main-loop.h | 8
accel/tcg/tcg-accel-ops-rr.c | 4 ++--
hw/display/virtio-gpu.c | 2
QL". This
makes the code easier to understand.
Stefan Hajnoczi (6):
system/cpus: rename qemu_mutex_lock_iothread() to qemu_bql_lock()
qemu/main-loop: rename QEMU_IOTHREAD_LOCK_GUARD to QEMU_BQL_LOCK_GUARD
qemu/main-loop: rename qemu_cond_wait_iothread() to
qemu_cond_wait_bql()
The term "iothread lock" is obsolete. The APIs use Big QEMU Lock (BQL)
in their names. Update the code comments to use "BQL" instead of
"iothread lock".
Signed-off-by: Stefan Hajnoczi
---
docs/devel/reset.rst | 2 +-
hw/display/qxl.h
The APIs using qemu_global_mutex now follow the Big QEMU Lock (BQL)
nomenclature. It's a little strange that the actual QemuMutex variable
that embodies the BQL is called qemu_global_mutex instead of qemu_bql.
Rename it for consistency.
Signed-off-by: Stefan Hajnoczi
---
system/cpus.c
The name "iothread" is overloaded. Use the term Big QEMU Lock (BQL)
instead, it is already widely used and unambiguous.
Signed-off-by: Stefan Hajnoczi
---
include/qemu/main-loop.h | 20 ++--
hw/i386/kvm/xen_evtchn.c | 14 +++---
hw/i386/kvm/xen_gnttab.c |
substance
unchanged and just removed mention of the AioContext.
Signed-off-by: Stefan Hajnoczi
---
include/block/block-common.h | 3 --
include/block/block-io.h | 9 ++--
include/block/block_int-common.h | 2 -
block.c | 73
The AioContext lock no longer exists.
Signed-off-by: Stefan Hajnoczi
---
include/qemu/job.h | 20
1 file changed, 20 deletions(-)
diff --git a/include/qemu/job.h b/include/qemu/job.h
index e502787dd8..9ea98b5927 100644
--- a/include/qemu/job.h
+++ b/include/qemu/job.h
The SCSI subsystem no longer uses the AioContext lock. Request
processing runs exclusively in the BlockBackend's AioContext since
"scsi: only access SCSIDevice->requests from one thread" and hence the
lock is unnecessary.
Signed-off-by: Stefan Hajnoczi
---
hw/scsi/scsi-di
The AioContext lock no longer has any effect. Remove it.
Signed-off-by: Stefan Hajnoczi
---
include/hw/virtio/virtio-scsi.h | 14 --
hw/scsi/scsi-bus.c | 2 --
hw/scsi/scsi-disk.c | 28
hw/scsi/virtio-scsi.c | 18
Now that the AioContext lock no longer exists, AIO_WAIT_WHILE() and
AIO_WAIT_WHILE_UNLOCKED() are equivalent.
A future patch will get rid of AIO_WAIT_WHILE_UNLOCKED().
Signed-off-by: Stefan Hajnoczi
---
include/block/aio-wait.h | 16
1 file changed, 4 insertions(+), 12
Stop acquiring/releasing the AioContext lock in
bdrv_graph_wrlock()/bdrv_graph_unlock() since the lock no longer has any
effect.
The distinction between bdrv_graph_wrunlock() and
bdrv_graph_wrunlock_ctx() becomes meaningless and they can be collapsed
into one function.
Signed-off-by: Stefan
Encourage the use of locking primitives and stop mentioning the
AioContext lock since it is being removed.
Signed-off-by: Stefan Hajnoczi
---
docs/devel/multiple-iothreads.txt | 45 +++
1 file changed, 15 insertions(+), 30 deletions(-)
diff --git a/docs/devel
everyone who helped with this effort,
including Eric Blake, code reviewer extraordinaire, and others who I've
forgotten to mention.
Signed-off-by: Stefan Hajnoczi
---
include/block/aio.h | 17 -
util/async.c| 10 --
2 files changed, 27 deletions(-)
diff --git a
es 10-12 remove comments.
Based-on: 20231123194931.171598-1-stefa...@redhat.com ("[PATCH 0/4] scsi:
eliminate AioContext lock")
Since SCSI needs to stop relying on the AioContext lock before we can remove
the lock.
Stefan Hajnoczi (12):
virtio-scsi: replace AioContext lock with tm
incrementally.
I have performed "make check" and qemu-iotests stress tests across
x86-64, ppc64le, and aarch64 to confirm that there are no failures as a
result of eliminating the lock.
Signed-off-by: Stefan Hajnoczi
---
util/async.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
aio_wait_bh_oneshot().
This avoids more locking to protect the virtqueue and SCSI layer state.
Signed-off-by: Stefan Hajnoczi
---
include/hw/virtio/virtio-scsi.h | 3 +-
hw/scsi/virtio-scsi.c | 62 ++---
2 files changed, 43 insertions(+), 22 deletions(-)
diff --git a
The aio_context_acquire() API is being removed. Drop the test case that
calls the API.
Signed-off-by: Stefan Hajnoczi
---
tests/unit/test-aio.c | 67 +--
1 file changed, 1 insertion(+), 66 deletions(-)
diff --git a/tests/unit/test-aio.c b/tests/unit/test
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/8.2 for any
user-visible changes.
signature.asc
Description: PGP signature
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/8.2 for any
user-visible changes.
signature.asc
Description: PGP signature
aplane/xen-block.c | 4 ++--
> hw/block/m25p80.c | 2 +-
> hw/block/onenand.c | 2 +-
> hw/block/pflash_cfi01.c| 1 +
> hw/block/pflash_cfi02.c| 6 --
> 5 files changed, 9 insertions(+), 6 deletions(-)
Reviewed-by: Stefan Hajnoczi
-playbooks/-/tree/blk_io_plug-irqfd
This duplicates the BH that virtio-blk uses for batching. The next
commit will remove it.
Reviewed-by: Eric Blake
Signed-off-by: Stefan Hajnoczi
---
block/io_uring.c | 6 ++
block/linux-aio.c | 4
hw/virtio/virtio.c | 13
c, my_obj); <-- another
...
defer_call_end(); <-- end of section, my_func(my_obj) is called once
Suggested-by: Ilya Maximets
Reviewed-by: Philippe Mathieu-Daudé
Signed-off-by: Stefan Hajnoczi
---
MAINTAINERS | 3 ++-
include/qemu/defer-call.h | 16 ++
: Philippe Mathieu-Daudé
Reviewed-by: Paul Durrant
Signed-off-by: Stefan Hajnoczi
---
include/sysemu/block-backend-io.h | 6 +-
block/blkio.c | 8 +--
block/io_uring.c | 4 +-
block/linux-aio.c | 4 +-
block/nvme.c
. Modern drivers
enable EVENT_IDX.
Reviewed-by: Eric Blake
Signed-off-by: Stefan Hajnoczi
---
hw/block/dataplane/virtio-blk.c | 48 +
1 file changed, 1 insertion(+), 47 deletions(-)
diff --git a/hw/block/dataplane/virtio-blk.c b/hw/block/dataplane/virtio-blk.c
index
available here:
https://gitlab.com/stefanha/virt-playbooks/-/tree/blk_io_plug-irqfd
Stefan Hajnoczi (4):
block: rename blk_io_plug_call() API to defer_call()
util/defer-call: move defer_call() to util/
virtio: use defer_call() in virtio_irqfd_notify()
virtio-blk: remove batch notification BH
On Fri, Aug 18, 2023 at 10:31:40AM +0200, Philippe Mathieu-Daudé wrote:
> Hi Stefan,
>
> On 17/8/23 17:58, Stefan Hajnoczi wrote:
> > The networking subsystem may wish to use defer_call(), so move the code
> > to util/ where it can be reused.
> >
> > As a r
else rename variables.
>
> Signed-off-by: Markus Armbruster
> ---
> block/monitor/bitmap-qmp-cmds.c | 2 +-
> block/qcow2-bitmap.c| 3 +--
> 2 files changed, 2 insertions(+), 3 deletions(-)
Reviewed-by: Stefan Hajnoczi
signature.asc
Description: PGP signature
else rename variables.
>
> Signed-off-by: Markus Armbruster
> ---
> block/vdi.c | 7 +++
> 1 file changed, 3 insertions(+), 4 deletions(-)
Reviewed-by: Stefan Hajnoczi
signature.asc
Description: PGP signature
5 files changed, 25 insertions(+), 25 deletions(-)
Reviewed-by: Stefan Hajnoczi
signature.asc
Description: PGP signature
. Modern drivers
enable EVENT_IDX.
Signed-off-by: Stefan Hajnoczi
---
hw/block/dataplane/virtio-blk.c | 48 +
1 file changed, 1 insertion(+), 47 deletions(-)
diff --git a/hw/block/dataplane/virtio-blk.c b/hw/block/dataplane/virtio-blk.c
index da36fcfd0b..f83bb0f116
-playbooks/-/tree/blk_io_plug-irqfd
This duplicates the BH that virtio-blk uses for batching. The next
commit will remove it.
Signed-off-by: Stefan Hajnoczi
---
block/io_uring.c | 6 ++
block/linux-aio.c | 4
hw/virtio/virtio.c | 11 ++-
util/thread-pool.c | 5 +
4 files
c, my_obj); <-- another
...
defer_call_end(); <-- end of section, my_func(my_obj) is called once
Suggested-by: Ilya Maximets
Signed-off-by: Stefan Hajnoczi
---
MAINTAINERS | 3 ++-
include/qemu/defer-call.h | 15 +++
include/sysemu/block-backend-io.h |
: Stefan Hajnoczi
---
include/sysemu/block-backend-io.h | 6 +-
block/blkio.c | 8 +--
block/io_uring.c | 4 +-
block/linux-aio.c | 4 +-
block/nvme.c | 4 +-
block/plug.c | 109
layer configuration) compared to no completion batching. iodepth=1
decreases by ~1% but this could be noise. Benchmark details are available here:
https://gitlab.com/stefanha/virt-playbooks/-/tree/blk_io_plug-irqfd
Stefan Hajnoczi (4):
block: rename blk_io_plug_call() API to defer_call()
util
Sorry!
Reviewed-by: Stefan Hajnoczi
lk_io_plug()/blk_io_unplug() no longer require a BlockBackend argument
because the plug state is now thread-local.
Later patches convert block drivers to blk_io_plug_call() and then we
can finally remove .bdrv_co_io_plug() once all block drivers have been
converted.
Signed-off-by: Stefan Hajnoczi
Reviewed-by:
kus Armbruster
Reviewed-by: Stefan Hajnoczi
Signed-off-by: Stefano Garzarella
Message-id: 20230530071941.8954-3-sgarz...@redhat.com
Signed-off-by: Stefan Hajnoczi
---
qapi/block-core.json | 6 ++
meson.build | 4
2 files changed, 10 insertions(+)
diff --git a/qapi/block-cor
No block driver implements .bdrv_co_io_plug() anymore. Get rid of the
function pointers.
Signed-off-by: Stefan Hajnoczi
Reviewed-by: Eric Blake
Reviewed-by: Stefano Garzarella
Acked-by: Kevin Wolf
Message-id: 20230530180959.1108766-7-stefa...@redhat.com
Signed-off-by: Stefan Hajnoczi
laio_unplug_fn(). It is not
obvious that this condition affects performance in practice, so I am
removing it instead of trying to come up with a more complex mechanism
to preserve the condition.
Signed-off-by: Stefan Hajnoczi
Reviewed-by: Eric Blake
Acked-by: Kevin Wolf
Reviewed-by: Stefano
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
Reviewed-by: Eric Blake
Reviewed-by: Stefano Garzarella
Acked-by: Kevin Wolf
Message-id
qemu_open() to open the `path`, so we can handle fd passing
from the management layer through the "/dev/fdset/N" special path.
Reviewed-by: Stefan Hajnoczi
Signed-off-by: Stefano Garzarella
Message-id: 20230530071941.8954-2-sgarz...@redhat.com
Signed-off-by: Stefan Hajnoczi
---
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
Reviewed-by: Eric Blake
Reviewed-by: Stefano Garzarella
Acked-by: Kevin Wolf
Message-id
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
Reviewed-by: Eric Blake
Reviewed-by: Stefano Garzarella
Acked-by: Kevin Wolf
Message-id
thread-local blk_io_plug() series
----
Stefan Hajnoczi (6):
block: add blk_io_plug_call() API
block/nvme: convert to blk_io_plug_call() API
block/blkio: convert to blk_io_plug_call() API
block/io_uring: convert to blk_io_plug_cal
On Tue, May 30, 2023 at 02:09:53PM -0400, Stefan Hajnoczi wrote:
> v3
> - Patch 5: Mention why dev_max_batch condition was dropped [Stefano]
> v2
> - Patch 1: "is not be freed" -> "is not freed" [Eric]
> - Patch 2: Remove unused nvme_process_completion_
1 - 100 of 334 matches
Mail list logo