[PATCH v5 0/4] AioContext removal: LinuxAioState and ThreadPool

Emanuele Giuseppe Esposito posted 4 patches 1 year, 2 months ago
Failed in applying to current master (apply log)
Maintainers: Stefan Berger <stefanb@linux.vnet.ibm.com>, Kevin Wolf <kwolf@redhat.com>, Hanna Reitz <hreitz@redhat.com>, Stefan Weil <sw@weilnetz.de>, Aarushi Mehta <mehta.aaru20@gmail.com>, Julia Suvorova <jusual@redhat.com>, Stefan Hajnoczi <stefanha@redhat.com>, Stefano Garzarella <sgarzare@redhat.com>, Greg Kurz <groug@kaod.org>, Christian Schoenebeck <qemu_oss@crudebyte.com>, Daniel Henrique Barboza <danielhb413@gmail.com>, "Cédric Le Goater" <clg@kaod.org>, David Gibson <david@gibson.dropbear.id.au>, "Michael S. Tsirkin" <mst@redhat.com>, Fam Zheng <fam@euphon.net>, Paolo Bonzini <pbonzini@redhat.com>
include/block/aio.h               |  8 ------
include/block/raw-aio.h           | 33 ++++++++++++++++-------
include/block/thread-pool.h       | 15 ++++++-----
include/sysemu/block-backend-io.h |  6 +++++
backends/tpm/tpm_backend.c        |  4 +--
block/file-posix.c                | 45 ++++++++++++-------------------
block/file-win32.c                |  4 +--
block/io_uring.c                  | 23 ++++++++++------
block/linux-aio.c                 | 29 +++++++++++---------
block/qcow2-threads.c             |  3 +--
hw/9pfs/coth.c                    |  3 +--
hw/ppc/spapr_nvdimm.c             |  6 ++---
hw/virtio/virtio-pmem.c           |  3 +--
scsi/pr-manager.c                 |  3 +--
scsi/qemu-pr-helper.c             |  3 +--
tests/unit/test-thread-pool.c     | 12 ++++-----
util/thread-pool.c                | 25 +++++++++--------
17 files changed, 113 insertions(+), 112 deletions(-)
[PATCH v5 0/4] AioContext removal: LinuxAioState and ThreadPool
Posted by Emanuele Giuseppe Esposito 1 year, 2 months ago
Just remove some AioContext lock in LinuxAioState and ThreadPool.
Not related to anything specific, so I decided to send it as
a separate patch.

These patches are taken from Paolo's old draft series.

---
v5:
* apply Stefan comments, add patch 4 to remove ThreadPool * param
  from thread_pool_submit*
* document that functions run in current IOThread

v4:
* add missing aio_context removal, and fix typo

v3:
* remove qemu_coroutine_enter_if_inactive

v2:
* assertion in thread_pool
* remove useless BlockDriverState * param in patch 1 and 2
* io_uring cleaned too


Emanuele Giuseppe Esposito (4):
  linux-aio: use LinuxAioState from the running thread
  io_uring: use LuringState from the running thread
  thread-pool: use ThreadPool from the running thread
  thread-pool: avoid passing the pool parameter every time

 include/block/aio.h               |  8 ------
 include/block/raw-aio.h           | 33 ++++++++++++++++-------
 include/block/thread-pool.h       | 15 ++++++-----
 include/sysemu/block-backend-io.h |  6 +++++
 backends/tpm/tpm_backend.c        |  4 +--
 block/file-posix.c                | 45 ++++++++++++-------------------
 block/file-win32.c                |  4 +--
 block/io_uring.c                  | 23 ++++++++++------
 block/linux-aio.c                 | 29 +++++++++++---------
 block/qcow2-threads.c             |  3 +--
 hw/9pfs/coth.c                    |  3 +--
 hw/ppc/spapr_nvdimm.c             |  6 ++---
 hw/virtio/virtio-pmem.c           |  3 +--
 scsi/pr-manager.c                 |  3 +--
 scsi/qemu-pr-helper.c             |  3 +--
 tests/unit/test-thread-pool.c     | 12 ++++-----
 util/thread-pool.c                | 25 +++++++++--------
 17 files changed, 113 insertions(+), 112 deletions(-)

-- 
2.39.1
Re: [PATCH v5 0/4] AioContext removal: LinuxAioState and ThreadPool
Posted by Kevin Wolf 1 year, 1 month ago
Am 03.02.2023 um 14:17 hat Emanuele Giuseppe Esposito geschrieben:
> Just remove some AioContext lock in LinuxAioState and ThreadPool.
> Not related to anything specific, so I decided to send it as
> a separate patch.
> 
> These patches are taken from Paolo's old draft series.

Thanks, applied to the block-next branch.

Kevin
Re: [PATCH v5 0/4] AioContext removal: LinuxAioState and ThreadPool
Posted by Stefan Hajnoczi 1 year, 1 month ago
On Fri, Feb 03, 2023 at 08:17:27AM -0500, Emanuele Giuseppe Esposito wrote:
> Just remove some AioContext lock in LinuxAioState and ThreadPool.
> Not related to anything specific, so I decided to send it as
> a separate patch.
> 
> These patches are taken from Paolo's old draft series.

Despite the concerns that I mentioned, an x86 guest booted up and ran
fio benchmarks fine in various configurations
(aio=threads/native/io_uring, iothread on/off).

Stefan