From patchwork Wed Jul 28 00:41:41 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sridhar Samudrala X-Patchwork-Id: 60078 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 93AD5B6EE8 for ; Wed, 28 Jul 2010 10:42:13 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753921Ab0G1Alp (ORCPT ); Tue, 27 Jul 2010 20:41:45 -0400 Received: from e32.co.us.ibm.com ([32.97.110.150]:57857 "EHLO e32.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753867Ab0G1Alo (ORCPT ); Tue, 27 Jul 2010 20:41:44 -0400 Received: from d03relay03.boulder.ibm.com (d03relay03.boulder.ibm.com [9.17.195.228]) by e32.co.us.ibm.com (8.14.4/8.13.1) with ESMTP id o6S0XhFG029653; Tue, 27 Jul 2010 18:33:43 -0600 Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by d03relay03.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o6S0fhVQ150444; Tue, 27 Jul 2010 18:41:43 -0600 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id o6S0fgj6032041; Tue, 27 Jul 2010 18:41:43 -0600 Received: from [9.47.18.19] (w-sridhar.beaverton.ibm.com [9.47.18.19]) by d03av02.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id o6S0fglX032025; Tue, 27 Jul 2010 18:41:42 -0600 Subject: Re: Make vhost multi-threaded and associate each thread to its guest's cgroup From: Sridhar Samudrala To: "Michael S. Tsirkin" Cc: netdev , lkml , "kvm@vger.kernel.org" , Tejun Heo , Li Zefan In-Reply-To: <20100727204254.GA17947@redhat.com> References: <20100727204254.GA17947@redhat.com> Date: Tue, 27 Jul 2010 17:41:41 -0700 Message-Id: <1280277701.27059.11.camel@w-sridhar.beaverton.ibm.com> Mime-Version: 1.0 X-Mailer: Evolution 2.26.3 (2.26.3-1.fc11) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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 --- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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 #include #include +#include #include #include @@ -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 */