netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Make vhost multi-threaded and associate each thread to its guest's cgroup
@ 2010-07-27 20:42 Michael S. Tsirkin
  2010-07-28  0:41 ` Sridhar Samudrala
  0 siblings, 1 reply; 3+ messages in thread
From: Michael S. Tsirkin @ 2010-07-27 20:42 UTC (permalink / raw)
  To: Sridhar Samudrala; +Cc: netdev, lkml, kvm@vger.kernel.org, Tejun Heo, Li Zefan

Sridhar,
I pushed a patchset with all known issues fixed,
on my vhost-net-next branch.

For now this ignores the cpu mask issue, addressing
only the cgroups issue.

Would appreciate testing and reports.

Thanks,
-- 
MST

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Make vhost multi-threaded and associate each thread to its guest's cgroup
  2010-07-27 20:42 Make vhost multi-threaded and associate each thread to its guest's cgroup Michael S. Tsirkin
@ 2010-07-28  0:41 ` Sridhar Samudrala
  2010-07-28  1:12   ` Michael S. Tsirkin
  0 siblings, 1 reply; 3+ messages in thread
From: Sridhar Samudrala @ 2010-07-28  0:41 UTC (permalink / raw)
  To: Michael S. Tsirkin; +Cc: netdev, lkml, kvm@vger.kernel.org, Tejun Heo, Li Zefan

On Tue, 2010-07-27 at 23:42 +0300, Michael S. Tsirkin wrote:
> Sridhar,
> I pushed a patchset with all known issues fixed,
> on my vhost-net-next branch.
> 
> For now this ignores the cpu mask issue, addressing
> only the cgroups issue.
> 
> Would appreciate testing and reports.

I had to apply the following patch to get it build.
With this patch, i am seeing similar results as i saw earlier.

Thanks
Sridhar

diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
index 996e751..8543898 100644
--- a/drivers/vhost/vhost.c
+++ b/drivers/vhost/vhost.c
@@ -23,6 +23,7 @@
 #include <linux/highmem.h>
 #include <linux/slab.h>
 #include <linux/kthread.h>
+#include <linux/cgroup.h>
 
 #include <linux/net.h>
 #include <linux/if_packet.h>
@@ -252,7 +253,7 @@ static long vhost_dev_set_owner(struct vhost_dev *dev)
 	}
 
 	dev->worker = worker;
-	err = cgroup_attach_task_current_cg(poller);
+	err = cgroup_attach_task_current_cg(worker);
 	if (err)
 		goto err_cgroup;
 	wake_up_process(worker);	/* avoid contributing to loadavg */

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: Make vhost multi-threaded and associate each thread to its guest's cgroup
  2010-07-28  0:41 ` Sridhar Samudrala
@ 2010-07-28  1:12   ` Michael S. Tsirkin
  0 siblings, 0 replies; 3+ messages in thread
From: Michael S. Tsirkin @ 2010-07-28  1:12 UTC (permalink / raw)
  To: Sridhar Samudrala; +Cc: netdev, lkml, kvm@vger.kernel.org, Tejun Heo, Li Zefan

On Tue, Jul 27, 2010 at 05:41:41PM -0700, Sridhar Samudrala wrote:
> On Tue, 2010-07-27 at 23:42 +0300, Michael S. Tsirkin wrote:
> > Sridhar,
> > I pushed a patchset with all known issues fixed,
> > on my vhost-net-next branch.
> > 
> > For now this ignores the cpu mask issue, addressing
> > only the cgroups issue.
> > 
> > Would appreciate testing and reports.
> 
> I had to apply the following patch to get it build.
> With this patch, i am seeing similar results as i saw earlier.
> 
> Thanks
> Sridhar


Excellent, thanks for the testing.


> diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
> index 996e751..8543898 100644
> --- a/drivers/vhost/vhost.c
> +++ b/drivers/vhost/vhost.c
> @@ -23,6 +23,7 @@
>  #include <linux/highmem.h>
>  #include <linux/slab.h>
>  #include <linux/kthread.h>
> +#include <linux/cgroup.h>
>  
>  #include <linux/net.h>
>  #include <linux/if_packet.h>
> @@ -252,7 +253,7 @@ static long vhost_dev_set_owner(struct vhost_dev *dev)
>  	}
>  
>  	dev->worker = worker;
> -	err = cgroup_attach_task_current_cg(poller);
> +	err = cgroup_attach_task_current_cg(worker);
>  	if (err)
>  		goto err_cgroup;
>  	wake_up_process(worker);	/* avoid contributing to loadavg */
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-07-28  1:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-27 20:42 Make vhost multi-threaded and associate each thread to its guest's cgroup Michael S. Tsirkin
2010-07-28  0:41 ` Sridhar Samudrala
2010-07-28  1:12   ` Michael S. Tsirkin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).