Update vhost_blk to queue works on virtqueue workers. Together
with previous changes this allows us to split virtio blk requests
across several threads.

                        | randread, IOPS | randwrite, IOPS |
8vcpu, 1 kernel worker  |      497k      |      469k       |
8vcpu, 2 kernel workers |      730k      |      701k       |

https://jira.sw.ru/browse/PSBM-139414
Signed-off-by: Andrey Zhadchenko <andrey.zhadche...@virtuozzo.com>
---
 drivers/vhost/blk.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/vhost/blk.c b/drivers/vhost/blk.c
index 933c9c50b0a6..6aa87c22c4df 100644
--- a/drivers/vhost/blk.c
+++ b/drivers/vhost/blk.c
@@ -161,13 +161,12 @@ static inline int vhost_blk_set_status(struct 
vhost_blk_req *req, u8 status)
 static void vhost_blk_req_done(struct bio *bio)
 {
        struct vhost_blk_req *req = bio->bi_private;
-       struct vhost_blk *blk = req->blk;
 
        req->bio_err = blk_status_to_errno(bio->bi_status);
 
        if (atomic_dec_and_test(&req->bio_nr)) {
                llist_add(&req->llnode, &req->blk_vq->llhead);
-               vhost_work_queue(&blk->dev, &req->blk_vq->work);
+               vhost_work_queue_vq(&req->blk_vq->vq, &req->blk_vq->work);
        }
 
        bio_put(bio);
-- 
2.31.1

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to