Re: [PATCH v3 3/9] vhost: Add the cgroup related function
From: Mike Christie <michael.christie@oracle.com>
Date: 2024-11-25 15:22:45
Also in:
lkml, virtualization
From: Mike Christie <michael.christie@oracle.com>
Date: 2024-11-25 15:22:45
Also in:
lkml, virtualization
On 11/5/24 1:25 AM, Cindy Lu wrote:
+static int vhost_attach_cgroups(struct vhost_dev *dev)
+{
+ struct vhost_worker *worker;
+ unsigned long i;
+ int ret;
+
+ /*
+ * Free the default worker we created and cleanup workers userspace
+ * created but couldn't clean up (it forgot or crashed).
+ */I think this comment got added here by accident.
+
+ xa_for_each(&dev->worker_xa, i, worker) {
+ ret = vhost_worker_cgroups_kthread(worker);
+ if (ret)
+ return ret;
+ }
+ return ret;
+}
+
/* Caller should have device mutex */
bool vhost_dev_has_owner(struct vhost_dev *dev)
{