[Devel] [PATCH RH9 10/10] drivers/vhost: queue vhost_blk works at vq workers
Konstantin Khorenko
khorenko at virtuozzo.com
Sat Sep 3 00:54:34 MSK 2022
On 16.08.2022 09:44, Andrey Zhadchenko wrote:
> 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.zhadchenko at 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 2c3cda47b54f..782e522ea8fc 100644
> --- a/drivers/vhost/blk.c
> +++ b/drivers/vhost/blk.c
> @@ -160,13 +160,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);
LGTM
More information about the Devel
mailing list