[Devel] [PATCH RHEL9 COMMIT] Revert "drivers/vhost: assign workers to virtqueues"

Konstantin Khorenko khorenko at virtuozzo.com
Wed Nov 16 17:03:17 MSK 2022


The commit is pushed to "branch-rh9-5.14.0-70.22.1.vz9.17.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh9-5.14.0-70.22.1.vz9.17.9
------>
commit 87c2d973606c65b37a92a5247d9526e2c3f75ab9
Author: Konstantin Khorenko <khorenko at virtuozzo.com>
Date:   Wed Nov 16 15:56:07 2022 +0300

    Revert "drivers/vhost: assign workers to virtqueues"
    
    This reverts commit 9ca22402119d7785416b5df151d49063828aff14.
    
    Will apply v5 of the patchset.
    https://jira.sw.ru/browse/PSBM-139414
    
    Signed-off-by: Konstantin Khorenko <khorenko at virtuozzo.com>
---
 drivers/vhost/vhost.c | 13 -------------
 drivers/vhost/vhost.h |  2 --
 2 files changed, 15 deletions(-)

diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
index 750f17afa47a..9066241e8dc6 100644
--- a/drivers/vhost/vhost.c
+++ b/drivers/vhost/vhost.c
@@ -675,17 +675,6 @@ static int vhost_set_workers(struct vhost_dev *dev, int n)
 	return ret;
 }
 
-static void vhost_assign_workers(struct vhost_dev *dev)
-{
-	int i, j = 0;
-
-	for (i = 0; i < dev->nvqs; i++) {
-		dev->vqs[i]->worker = &dev->workers[j];
-		if (++j == dev->nworkers)
-			j = 0;
-	}
-}
-
 /* Caller should have device mutex */
 long vhost_dev_set_owner(struct vhost_dev *dev)
 {
@@ -708,7 +697,6 @@ long vhost_dev_set_owner(struct vhost_dev *dev)
 	if (err)
 		goto err_worker;
 
-	vhost_assign_workers(dev);
 	return 0;
 err_worker:
 	vhost_cleanup_workers(dev);
@@ -1907,7 +1895,6 @@ long vhost_dev_ioctl(struct vhost_dev *d, unsigned int ioctl, void __user *argp)
 		}
 
 		r = vhost_set_workers(d, n);
-		vhost_assign_workers(d);
 		break;
 	default:
 		r = -ENOIOCTLCMD;
diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h
index 9632f6501617..634ea828cbba 100644
--- a/drivers/vhost/vhost.h
+++ b/drivers/vhost/vhost.h
@@ -138,8 +138,6 @@ struct vhost_virtqueue {
 	bool user_be;
 #endif
 	u32 busyloop_timeout;
-
-	struct vhost_worker *worker;
 };
 
 struct vhost_msg_node {


More information about the Devel mailing list