[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v2 14/14] block: remove outdated AioContext locking comments
Am 05.12.2023 um 19:20 hat Stefan Hajnoczi geschrieben: > The AioContext lock no longer exists. > > There is one noteworthy change: > > - * More specifically, these functions use BDRV_POLL_WHILE(bs), which > - * requires the caller to be either in the main thread and hold > - * the BlockdriverState (bs) AioContext lock, or directly in the > - * home thread that runs the bs AioContext. Calling them from > - * another thread in another AioContext would cause deadlocks. > + * More specifically, these functions use BDRV_POLL_WHILE(bs), which > requires > + * the caller to be either in the main thread or directly in the home > thread > + * that runs the bs AioContext. Calling them from another thread in another > + * AioContext would cause deadlocks. > > I am not sure whether deadlocks are still possible. Maybe they have just > moved to the fine-grained locks that have replaced the AioContext. Since > I am not sure if the deadlocks are gone, I have kept the substance > unchanged and just removed mention of the AioContext. > > Signed-off-by: Stefan Hajnoczi <stefanha@xxxxxxxxxx> > Reviewed-by: Eric Blake <eblake@xxxxxxxxxx> I think the deadlock the comment refers to is that AIO_WAIT_WHILE() sits in a blocking aio_poll() and nobody wakes it up because aio_wait_kick() only wakes up the main thread. This deadlock still exists after removing the AioContext lock, so the comment after your change looks right to me. Reviewed-by: Kevin Wolf <kwolf@xxxxxxxxxx>
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |