qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] aio-wait: avoid AioContext lock in aio_wait_bh_oneshot()


From: Paolo Bonzini
Subject: Re: [PATCH] aio-wait: avoid AioContext lock in aio_wait_bh_oneshot()
Date: Tue, 4 Apr 2023 18:51:22 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0

On 4/4/23 17:33, Stefan Hajnoczi wrote:
There is no need for the AioContext lock in aio_wait_bh_oneshot().
It's easy to remove the lock from existing callers and then switch from
AIO_WAIT_WHILE() to AIO_WAIT_WHILE_UNLOCKED() in aio_wait_bh_oneshot().

Document that the AioContext lock should not be held across
aio_wait_bh_oneshot(). Holding a lock across aio_poll() can cause
deadlock so we don't want callers to do that.

This is a step towards getting rid of the AioContext lock.

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>

Paolo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]