[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 01/12] virtio-scsi: replace AioContext lock with tmf_bh_lock
|
From: |
Eric Blake |
|
Subject: |
Re: [PATCH 01/12] virtio-scsi: replace AioContext lock with tmf_bh_lock |
|
Date: |
Thu, 30 Nov 2023 09:25:52 -0600 |
|
User-agent: |
NeoMutt/20231103 |
On Wed, Nov 29, 2023 at 02:55:42PM -0500, Stefan Hajnoczi wrote:
> Protect the Task Management Function BH state with a lock. The TMF BH
> runs in the main loop thread. An IOThread might process a TMF at the
> same time as the TMF BH is running. Therefore tmf_bh_list and tmf_bh
> must be protected by a lock.
>
> Run TMF request completion in the IOThread using aio_wait_bh_oneshot().
> This avoids more locking to protect the virtqueue and SCSI layer state.
Are we trying to get this into 8.2?
>
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---
> include/hw/virtio/virtio-scsi.h | 3 +-
> hw/scsi/virtio-scsi.c | 62 ++++++++++++++++++++++-----------
> 2 files changed, 43 insertions(+), 22 deletions(-)
>
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc.
Virtualization: qemu.org | libguestfs.org
- [PATCH 00/12] aio: remove AioContext lock, Stefan Hajnoczi, 2023/11/29
- [PATCH 01/12] virtio-scsi: replace AioContext lock with tmf_bh_lock, Stefan Hajnoczi, 2023/11/29
- Re: [PATCH 01/12] virtio-scsi: replace AioContext lock with tmf_bh_lock,
Eric Blake <=
- [PATCH 02/12] tests: remove aio_context_acquire() tests, Stefan Hajnoczi, 2023/11/29
- [PATCH 03/12] aio: make aio_context_acquire()/aio_context_release() a no-op, Stefan Hajnoczi, 2023/11/29
- [PATCH 04/12] graph-lock: remove AioContext locking, Stefan Hajnoczi, 2023/11/29
- [PATCH 06/12] scsi: remove AioContext locking, Stefan Hajnoczi, 2023/11/29
- [PATCH 07/12] aio-wait: draw equivalence between AIO_WAIT_WHILE() and AIO_WAIT_WHILE_UNLOCKED(), Stefan Hajnoczi, 2023/11/29