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
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
---
include/block/aio-wait.h | 16
1 file changed, 4 insertions(+), 12
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
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 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
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 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 |
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 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
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 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
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 |
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
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.
> >
>
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 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: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 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 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 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 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: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 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.
&
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
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
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 ++
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
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
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
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 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
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
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,
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
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
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
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
> > ++
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
.
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
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
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: Paul Durrant
Acked-by: David Woodhouse
Reviewed-by: Cédric Le Goater
Acked-by: Ilya Leoshkevich
---
include/qemu/m
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
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:
> >>
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, 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
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 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
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, 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.
> > + *
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
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
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: Paul Durrant
Acked-by: David Woodhouse
Reviewed-by: Cédric Le Goater
Acked-by: Ilya Leoshkevich
---
include/qemu/m
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
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
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
-
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_
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(-)
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
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
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 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 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
>
> Signed-off-by: Philippe Mathieu-Daudé
> Reviewed-by: Marc-André Lureau
> ---
> include/qemu/atomic.h | 17 -
> 1 file changed, 17 deletions(-)
Reviewed-by: Stefan Hajnoczi
signature.asc
Description: PGP signature
au
> ---
> tools/virtiofsd/fuse_common.h | 11 +--
> 1 file changed, 1 insertion(+), 10 deletions(-)
Reviewed-by: Stefan Hajnoczi
signature.asc
Description: PGP signature
| 4 ++--
> ui/gtk.c | 2 +-
> ui/spice-core.c | 2 +-
> 41 files changed, 51 insertions(+), 45 deletions(-)
>
> --
> 2.26.2
>
>
Reviewed-by: Stefan Hajnoczi
signature.asc
Description: PGP signature
On Wed, Sep 01, 2021 at 01:53:34PM +0100, Alex Bennée wrote:
>
> Stefan Hajnoczi writes:
>
> > [[PGP Signed Part:Undecided]]
> > On Wed, Aug 04, 2021 at 12:20:01PM -0700, Stefano Stabellini wrote:
> >> > Could we consider the kernel internally converting I
On Tue, Sep 28, 2021 at 7:55 AM Christopher Clark
wrote:
>
> On Mon, Sep 27, 2021 at 3:06 AM Alex Bennée via Stratos-dev
> wrote:
>>
>>
>> Marek Marczykowski-Górecki writes:
>>
>> > [[PGP Signed Part:Undecided]]
>> > On Fri, Sep 24, 2021 at 05:02:46PM +0100, Alex Bennée wrote:
>> > That is a si
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
: 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
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 |
-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
. 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
5 files changed, 25 insertions(+), 25 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
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
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
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
. 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
: 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
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 ++
-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
by: Daniil Tatianin
Signed-off-by: Stefan Hajnoczi
---
hw/scsi/scsi-bus.c| 3 ++-
hw/scsi/virtio-scsi.c | 18 +-
2 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/hw/scsi/scsi-bus.c b/hw/scsi/scsi-bus.c
index 07275fb631..64d7311757 100644
--- a/hw/scsi/scsi-b
Add a helper function to check whether the device is realized without
requiring the Big QEMU Lock. The next patch adds a second caller. The
goal is to avoid spreading DeviceState field accesses throughout the
code.
Suggested-by: Philippe Mathieu-Daudé
Signed-off-by: Stefan Hajnoczi
---
include
simple_device_unplug_cb()
returns.
Thanks to these two conditions we don't need aio_disable_external()
anymore.
Cc: Zhengui Li
Reviewed-by: Paolo Bonzini
Reviewed-by: Daniil Tatianin
Signed-off-by: Stefan Hajnoczi
---
hw/scsi/scsi-disk.c | 1 +
hw/scsi/virtio-scsi.c | 3 ---
2 file
vhost_user_server_stop() uses AIO_WAIT_WHILE(). AIO_WAIT_WHILE()
requires that AioContext is only acquired once.
Since blk_exp_request_shutdown() already acquires the AioContext it
shouldn't be acquired again in vhost_user_server_stop().
Signed-off-by: Stefan Hajnoczi
---
util/vhost
when there are requests in
flight. The in-flight counter needs to be atomic.
Signed-off-by: Stefan Hajnoczi
---
include/qemu/vhost-user-server.h | 4 +++-
block/export/vhost-user-blk-server.c | 19 +++
util/vhost-user-server.c | 14 ++
3 files c
Based-on: 087bc644b7634436ca9d52fe58ba9234e2bef026 (kevin/block-next)
Stefan Hajnoczi (16):
hw/qdev: introduce qdev_is_realized() helper
virtio-scsi: avoid race between unplug and transport event
virtio-scsi: stop using aio_disable_external() during unplug
block/export: only acquire AioCo
e are no
more requests.
Avoid confusing by renaming refcount and ref/unref to in_flight and
inc/dec.
Reviewed-by: Paolo Bonzini
Signed-off-by: Stefan Hajnoczi
---
include/qemu/vhost-user-server.h | 6 +++---
block/export/vhost-user-blk-server.c | 11 +++
util/vhost-user-ser
d the aio_disable_external()
API cannot be used since multiple AioContext may be processing I/O, not
just one.
Switch to BlockDevOps->drained_begin/end() callbacks.
Signed-off-by: Stefan Hajnoczi
---
block/export/vhost-user-blk-server.c | 43 ++--
util/vhost-user-server.c
The BlockBackend quiesce_counter is greater than zero during drained
sections. Add an API to check whether the BlockBackend is in a drained
section.
The next patch will use this API.
Signed-off-by: Stefan Hajnoczi
---
include/sysemu/block-backend-global-state.h | 1 +
block/block-backend.c
There is no need to suspend activity between aio_disable_external() and
aio_enable_external(), which is mainly used for the block layer's drain
operation.
This is part of ongoing work to remove the aio_disable_external() API.
Reviewed-by: David Woodhouse
Signed-off-by: Stefan Hajnoczi
--
o use BlockDevOps
.drained_begin/end() callbacks. It no longer relies on is_external=true
so it is safe to pass is_external=false.
This is part of ongoing work to remove the aio_disable_external() API.
Signed-off-by: Stefan Hajnoczi
---
hw/xen/xen-bus.c | 8
1 file changed, 4 insertions(
resume them in
.drained_end(). This eliminates the need for the
aio_set_fd_handler(is_external=true) flag, which is being removed from
QEMU.
This is a long list but splitting it into individual commits would
probably lead to git bisect failures - the changes are all related.
Signed-off-by:
depend on the
dataplane instance, so move the blk_set_dev_ops() call after
xen_block_dataplane_create().
Signed-off-by: Stefan Hajnoczi
---
hw/block/dataplane/xen-block.h | 2 ++
hw/block/dataplane/xen-block.c | 42 +-
hw/block/xen-block.c
: Stefan Hajnoczi
---
hw/block/dataplane/virtio-blk.c | 2 ++
hw/scsi/virtio-scsi-dataplane.c | 9 +
2 files changed, 11 insertions(+)
diff --git a/hw/block/dataplane/virtio-blk.c b/hw/block/dataplane/virtio-blk.c
index b28d81737e..bd7cc6e76b 100644
--- a/hw/block/dataplane/virtio-blk.c
+++ b
This is part of ongoing work to remove the aio_disable_external() API.
Use BlockDevOps .drained_begin/end/poll() instead of
aio_set_fd_handler(is_external=true).
As a side-effect the FUSE export now follows AioContext changes like the
other export types.
Signed-off-by: Stefan Hajnoczi
101 - 200 of 335 matches
Mail list logo