[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 02/10] vhost scsi: remove extra flushes
From: |
Mike Christie |
Subject: |
[PATCH 02/10] vhost scsi: remove extra flushes |
Date: |
Thu, 12 Nov 2020 17:19:02 -0600 |
The vhost work flush function was flushing the entire work queue, so
there is no need for the double vhost_work_dev_flush calls in
vhost_scsi_flush.
And we do not need to call vhost_poll_flush for each poller because
that call also ends up flushing the same work queue thread the
vhost_work_dev_flush call flushed.
Signed-off-by: Mike Christie <michael.christie@oracle.com>
---
drivers/vhost/scsi.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/drivers/vhost/scsi.c b/drivers/vhost/scsi.c
index 8795fd3..4725a08 100644
--- a/drivers/vhost/scsi.c
+++ b/drivers/vhost/scsi.c
@@ -1443,11 +1443,6 @@ static void vhost_scsi_handle_kick(struct vhost_work
*work)
vhost_scsi_handle_vq(vs, vq);
}
-static void vhost_scsi_flush_vq(struct vhost_scsi *vs, int index)
-{
- vhost_poll_flush(&vs->vqs[index].vq.poll);
-}
-
/* Callers must hold dev mutex */
static void vhost_scsi_flush(struct vhost_scsi *vs)
{
@@ -1466,9 +1461,6 @@ static void vhost_scsi_flush(struct vhost_scsi *vs)
kref_put(&old_inflight[i]->kref, vhost_scsi_done_inflight);
/* Flush both the vhost poll and vhost work */
- for (i = 0; i < VHOST_SCSI_MAX_VQ; i++)
- vhost_scsi_flush_vq(vs, i);
- vhost_work_dev_flush(&vs->dev);
vhost_work_dev_flush(&vs->dev);
/* Wait for all reqs issued before the flush to be finished */
--
1.8.3.1
- [PATCH 05/10] vhost: poll support support multiple workers, (continued)
- [PATCH 05/10] vhost: poll support support multiple workers, Mike Christie, 2020/11/12
- [PATCH 08/10] vhost: move msg_handler to new ops struct, Mike Christie, 2020/11/12
- [PATCH 09/10] vhost: add VHOST_SET_VRING_ENABLE support, Mike Christie, 2020/11/12
- [PATCH 03/10] vhost poll: fix coding style, Mike Christie, 2020/11/12
- [PATCH 07/10] vhost, vhost-scsi: flush IO vqs then send TMF rsp, Mike Christie, 2020/11/12
- [PATCH 02/10] vhost scsi: remove extra flushes,
Mike Christie <=
- [PATCH 01/10] vhost: remove work arg from vhost_work_flush, Mike Christie, 2020/11/12
- [PATCH 04/10] vhost: support multiple worker threads, Mike Christie, 2020/11/12
- [PATCH 10/10] vhost-scsi: create a woker per IO vq, Mike Christie, 2020/11/12
- [PATCH 06/10] vhost scsi: make SCSI cmd completion per vq, Mike Christie, 2020/11/12
- [PATCH 1/1] qemu vhost scsi: add VHOST_SET_VRING_ENABLE support, Mike Christie, 2020/11/12
- Re: [PATCH 00/10] vhost/qemu: thread per IO SCSI vq, Stefan Hajnoczi, 2020/11/17