[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH 0/4] aio: AIO_CONTEXT_ACQUIRE_GUARD() macro experiment
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [RFC PATCH 0/4] aio: AIO_CONTEXT_ACQUIRE_GUARD() macro experiment |
Date: |
Thu, 7 Oct 2021 16:16:48 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.0 |
On 10/7/21 15:15, Stefan Hajnoczi wrote:
> On Tue, Oct 05, 2021 at 08:58:03PM +0200, Philippe Mathieu-Daudé wrote:
>> Experiment to use glib g_autoptr/autofree features with
>> AIO context.
>> Since this is a RFC, only few examples are provided.
>>
>> TODO: Document the macros in docs/devel/multiple-iothreads.txt
>>
>> Philippe Mathieu-Daudé (4):
>> block/aio: Add automatically released aio_context variants
>> hw/scsi/scsi-disk: Use automatic AIO context lock
>> hw/scsi/scsi-generic: Use automatic AIO context lock
>> hw/block/virtio-blk: Use automatic AIO context lock
>>
>> include/block/aio.h | 24 ++++++++++++++++++++++++
>> hw/block/virtio-blk.c | 26 ++++++++++++--------------
>> hw/scsi/scsi-disk.c | 13 ++++---------
>> hw/scsi/scsi-generic.c | 6 +++---
>> 4 files changed, 43 insertions(+), 26 deletions(-)
>
> This is nice. Two things:
>
> 1. Emanuele is working on eliminating aio_context_acquire/release(), so
> a big effort to convert existing code to using guards could be wasted
> energy and cause conflicts with his patches.
Thanks for the update, I'll wait Emanuele effort to land.
> 2. A few callers anticipate that the AioContext of their BDS may change
> between acquire/release. Care needs to be taken when converting to
> preserve the semantics but most instances should be safe to convert.
>
> Stefan
>
- [RFC PATCH 0/4] aio: AIO_CONTEXT_ACQUIRE_GUARD() macro experiment, Philippe Mathieu-Daudé, 2021/10/05
- [RFC PATCH 1/4] block/aio: Add automatically released aio_context variants, Philippe Mathieu-Daudé, 2021/10/05
- [RFC PATCH 2/4] hw/scsi/scsi-disk: Use automatic AIO context lock, Philippe Mathieu-Daudé, 2021/10/05
- [RFC PATCH 3/4] hw/scsi/scsi-generic: Use automatic AIO context lock, Philippe Mathieu-Daudé, 2021/10/05
- [RFC PATCH 4/4] hw/block/virtio-blk: Use automatic AIO context lock, Philippe Mathieu-Daudé, 2021/10/05
- Re: [RFC PATCH 0/4] aio: AIO_CONTEXT_ACQUIRE_GUARD() macro experiment, Stefan Hajnoczi, 2021/10/07
- Re: [RFC PATCH 0/4] aio: AIO_CONTEXT_ACQUIRE_GUARD() macro experiment,
Philippe Mathieu-Daudé <=