Re: [PATCH v2 04/14] aio: make aio_context_acquire()/aio_context_release() a no-op

2023-12-20 Thread Stefan Hajnoczi
On Tue, 19 Dec 2023 at 13:20, Kevin Wolf wrote: > > Am 19.12.2023 um 16:28 hat Kevin Wolf geschrieben: > > Am 05.12.2023 um 19:20 hat Stefan Hajnoczi geschrieben: > > > aio_context_acquire()/aio_context_release() has been replaced by > > > fine-grained locking to protect state shared by multiple t

Re: [PATCH v2 04/14] aio: make aio_context_acquire()/aio_context_release() a no-op

2023-12-20 Thread Stefan Hajnoczi
On Wed, 20 Dec 2023 at 04:32, Kevin Wolf wrote: > > Am 19.12.2023 um 22:23 hat Stefan Hajnoczi geschrieben: > > The following hack makes the test pass but there are larger safety > > issues that I'll need to look at on Wednesday: > > I see, you're taking the same approach as in the SCSI layer: Don

Re: [PATCH v2 04/14] aio: make aio_context_acquire()/aio_context_release() a no-op

2023-12-20 Thread Kevin Wolf
Am 19.12.2023 um 22:23 hat Stefan Hajnoczi geschrieben: > The following hack makes the test pass but there are larger safety > issues that I'll need to look at on Wednesday: I see, you're taking the same approach as in the SCSI layer: Don't make things thread-safe, but just always access them from

Re: [PATCH v2 04/14] aio: make aio_context_acquire()/aio_context_release() a no-op

2023-12-19 Thread Stefan Hajnoczi
The following hack makes the test pass but there are larger safety issues that I'll need to look at on Wednesday: diff --git a/nbd/server.c b/nbd/server.c index 895cf0a752..cf4b7d5c6d 100644 --- a/nbd/server.c +++ b/nbd/server.c @@ -1617,7 +1617,7 @@ static void nbd_drained_begin(void *opaque)

Re: [PATCH v2 04/14] aio: make aio_context_acquire()/aio_context_release() a no-op

2023-12-19 Thread Kevin Wolf
Am 19.12.2023 um 16:28 hat Kevin Wolf geschrieben: > Am 05.12.2023 um 19:20 hat Stefan Hajnoczi geschrieben: > > aio_context_acquire()/aio_context_release() has been replaced by > > fine-grained locking to protect state shared by multiple threads. The > > AioContext lock still plays the role of bal

Re: [PATCH v2 04/14] aio: make aio_context_acquire()/aio_context_release() a no-op

2023-12-19 Thread Kevin Wolf
Am 05.12.2023 um 19:20 hat Stefan Hajnoczi geschrieben: > aio_context_acquire()/aio_context_release() has been replaced by > fine-grained locking to protect state shared by multiple threads. The > AioContext lock still plays the role of balancing locking in > AIO_WAIT_WHILE() and many functions in

[PATCH v2 04/14] aio: make aio_context_acquire()/aio_context_release() a no-op

2023-12-05 Thread Stefan Hajnoczi
aio_context_acquire()/aio_context_release() has been replaced by fine-grained locking to protect state shared by multiple threads. The AioContext lock still plays the role of balancing locking in AIO_WAIT_WHILE() and many functions in QEMU either require that the AioContext lock is held or not held