From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Michael S. Tsirkin" Subject: Re: [PATCH 2/3] workqueue: Add an API to create a singlethread workqueue attached to the current task's cgroup Date: Thu, 27 May 2010 16:12:54 +0300 Message-ID: <20100527131254.GB7974@redhat.com> References: <1274227491.2370.110.camel@w-sridhar.beaverton.ibm.com> <20100527091426.GA6308@redhat.com> <20100527124448.GA4241@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Sridhar Samudrala , netdev , lkml , "kvm@vger.kernel.org" , Andrew Morton , Dmitri Vorobiev , Tejun Heo , Jiri Kosina , Thomas Gleixner , Ingo Molnar , Andi Kleen To: Oleg Nesterov Return-path: Content-Disposition: inline In-Reply-To: <20100527124448.GA4241@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org On Thu, May 27, 2010 at 02:44:48PM +0200, Oleg Nesterov wrote: > On 05/27, Michael S. Tsirkin wrote: > > > > On Tue, May 18, 2010 at 05:04:51PM -0700, Sridhar Samudrala wrote: > > > Add a new kernel API to create a singlethread workqueue and attach it's > > > task to current task's cgroup and cpumask. > > > > > > Signed-off-by: Sridhar Samudrala > > > > Could someone familiar with workqueue code please comment on whether > > this patch is suitable for 2.6.35? > > > > It is needed to fix the case where vhost user might cause a kernel > > thread to consume more CPU than allowed by the cgroup. > > Should I merge it through the vhost tree? > > Ack for this? > > I don't understand the reasons for this patch, but this doesn't matter. Depending on userspace application, driver can create a lot of work for a workqueue to handle. By making the workqueue thread belong in a cgroup, we make it possible to the CPU and other resources thus consumed. -- MST