[PATCH 0/3] Cleanup CoQueue restart functions

Paolo Bonzini posted 3 patches 2 years, 1 month ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20220427130830.150180-1-pbonzini@redhat.com
Maintainers: Stefan Hajnoczi <stefanha@redhat.com>, Fam Zheng <fam@euphon.net>, Kevin Wolf <kwolf@redhat.com>, Hanna Reitz <hreitz@redhat.com>, Gerd Hoffmann <kraxel@redhat.com>
block/io.c                 |  2 +-
include/qemu/coroutine.h   | 27 +++++++++++++++++-----
ui/console.c               |  2 +-
util/qemu-coroutine-lock.c | 47 +++++++++++++++-----------------------
4 files changed, 42 insertions(+), 36 deletions(-)
[PATCH 0/3] Cleanup CoQueue restart functions
Posted by Paolo Bonzini 2 years, 1 month ago
Sending this out now that NBD's incorrect uses have been fixed.

There is no equivalent of qemu_co_queue_enter_next that restarts all
coroutines but that is incorrect because qemu_co_queue_restart_all should
really be a coroutine_fn.  The NBD uses have been fixed by removing the
calls to qemu_co_queue_restart_all; graphic_hw_update_done works just
because it uses the BQL; but the new rwlock for the BlockDriverState
graph will need it.

The series introduces the new function, removes some duplicated code
around it, and marks qemu_co_queue_next and qemu_co_queue_restart_all
as coroutine_fn.

Paolo

Paolo Bonzini (3):
  coroutine-lock: qemu_co_queue_next is a coroutine-only
    qemu_co_enter_next
  coroutine-lock: introduce qemu_co_queue_enter_all
  coroutine-lock: qemu_co_queue_restart_all is a coroutine-only
    qemu_co_enter_all

 block/io.c                 |  2 +-
 include/qemu/coroutine.h   | 27 +++++++++++++++++-----
 ui/console.c               |  2 +-
 util/qemu-coroutine-lock.c | 47 +++++++++++++++-----------------------
 4 files changed, 42 insertions(+), 36 deletions(-)

-- 
2.35.1