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: 114680 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o6S0g9Vj028962 for ; Wed, 28 Jul 2010 00:42:09 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753914Ab0G1Alq (ORCPT ); Tue, 27 Jul 2010 20:41:46 -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: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Wed, 28 Jul 2010 00:42:09 +0000 (UTC) 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 */