[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v5 05/20] aio-wait.h: introduce AIO_WAIT_WHILE_UNLOCKED
From: |
Stefan Hajnoczi |
Subject: |
Re: [PATCH v5 05/20] aio-wait.h: introduce AIO_WAIT_WHILE_UNLOCKED |
Date: |
Thu, 17 Feb 2022 13:56:08 +0000 |
On Tue, Feb 08, 2022 at 09:34:58AM -0500, Emanuele Giuseppe Esposito wrote:
> Same as AIO_WAIT_WHILE macro, but if we are in the Main loop
> do not release and then acquire ctx_ 's aiocontext.
>
> Once all Aiocontext locks go away, this macro will replace
> AIO_WAIT_WHILE.
>
> Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
> ---
> include/block/aio-wait.h | 15 +++++++++++----
> 1 file changed, 11 insertions(+), 4 deletions(-)
>
> diff --git a/include/block/aio-wait.h b/include/block/aio-wait.h
> index b39eefb38d..ff27fe4eab 100644
> --- a/include/block/aio-wait.h
> +++ b/include/block/aio-wait.h
> @@ -59,10 +59,11 @@ typedef struct {
> extern AioWait global_aio_wait;
>
> /**
> - * AIO_WAIT_WHILE:
> + * _AIO_WAIT_WHILE:
> * @ctx: the aio context, or NULL if multiple aio contexts (for which the
> * caller does not hold a lock) are involved in the polling condition.
> * @cond: wait while this conditional expression is true
> + * @unlock: whether to unlock and then lock again @ctx
Please document that this only applies when waiting for another
AioContext from the main loop thread. It's ignored otherwise.
signature.asc
Description: PGP signature
- [PATCH v5 03/20] job.c: API functions not used outside should be static, (continued)
- [PATCH v5 03/20] job.c: API functions not used outside should be static, Emanuele Giuseppe Esposito, 2022/02/08
- [PATCH v5 14/20] block_job: rename block_job functions called with job_mutex held, Emanuele Giuseppe Esposito, 2022/02/08
- [PATCH v5 09/20] jobs: add job lock in find_* functions, Emanuele Giuseppe Esposito, 2022/02/08
- [PATCH v5 10/20] jobs: use job locks also in the unit tests, Emanuele Giuseppe Esposito, 2022/02/08
- [PATCH v5 16/20] commit and mirror: create new nodes using bdrv_get_aio_context, and not the job aiocontext, Emanuele Giuseppe Esposito, 2022/02/08
- [PATCH v5 13/20] job.h: rename job API functions called with job_mutex held, Emanuele Giuseppe Esposito, 2022/02/08
- [PATCH v5 05/20] aio-wait.h: introduce AIO_WAIT_WHILE_UNLOCKED, Emanuele Giuseppe Esposito, 2022/02/08
- Re: [PATCH v5 05/20] aio-wait.h: introduce AIO_WAIT_WHILE_UNLOCKED,
Stefan Hajnoczi <=
- [PATCH v5 08/20] jobs: protect jobs with job_lock/unlock, Emanuele Giuseppe Esposito, 2022/02/08
[PATCH v5 19/20] job.c: enable job lock/unlock and remove Aiocontext locks, Emanuele Giuseppe Esposito, 2022/02/08
[PATCH v5 20/20] block_job_query: remove atomic read, Emanuele Giuseppe Esposito, 2022/02/08
[PATCH v5 18/20] jobs: protect job.aio_context with BQL and job_mutex, Emanuele Giuseppe Esposito, 2022/02/08
[PATCH v5 12/20] jobs: rename static functions called with job_mutex held, Emanuele Giuseppe Esposito, 2022/02/08
[PATCH v5 11/20] block/mirror.c: use of job helpers in drivers to avoid TOC/TOU, Emanuele Giuseppe Esposito, 2022/02/08