Re: [PATCH 2/3] workqueue: Add an API to create a singlethread workqueue attached to the current task's cgroup

2010-05-30 Thread Michael S. Tsirkin
On Fri, May 28, 2010 at 05:54:42PM +0200, Tejun Heo wrote: > Hello, > > On 05/28/2010 05:08 PM, Michael S. Tsirkin wrote: > > Well, we have create_singlethread_workqueue, right? > > This is not very different ... is it? > > > > Just copying structures and code from workqueue.c, > > adding vhost_

Re: [PATCH 2/3] workqueue: Add an API to create a singlethread workqueue attached to the current task's cgroup

2010-05-28 Thread Tejun Heo
Hello, On 05/28/2010 05:08 PM, Michael S. Tsirkin wrote: > Well, we have create_singlethread_workqueue, right? > This is not very different ... is it? > > Just copying structures and code from workqueue.c, > adding vhost_ in front of it will definitely work: Sure it will, but you'll probably be

Re: [PATCH 2/3] workqueue: Add an API to create a singlethread workqueue attached to the current task's cgroup

2010-05-28 Thread Michael S. Tsirkin
On Thu, May 27, 2010 at 11:20:22PM +0200, Tejun Heo wrote: > Hello, Michael. > > On 05/27/2010 07:32 PM, Michael S. Tsirkin wrote: > > Well, this is why I proposed adding a new API for creating > > workqueue within workqueue.c, rather than exposing the task > > and attaching it to cgroups in our d

Re: [PATCH 2/3] workqueue: Add an API to create a singlethread workqueue attached to the current task's cgroup

2010-05-27 Thread Tejun Heo
Hello, Michael. On 05/27/2010 07:32 PM, Michael S. Tsirkin wrote: > Well, this is why I proposed adding a new API for creating > workqueue within workqueue.c, rather than exposing the task > and attaching it to cgroups in our driver: so that workqueue > maintainers can fix the implementation if it

Re: [PATCH 2/3] workqueue: Add an API to create a singlethread workqueue attached to the current task's cgroup

2010-05-27 Thread Michael S. Tsirkin
On Thu, May 27, 2010 at 06:56:20PM +0200, Tejun Heo wrote: > Hello, > > On 05/27/2010 06:39 PM, Michael S. Tsirkin wrote: > >> Unless you're gonna convert every driver to use this > >> special kind of workqueue (and what happens when multiple tasks from > >> different cgroups share the driver?), >

Re: [PATCH 2/3] workqueue: Add an API to create a singlethread workqueue attached to the current task's cgroup

2010-05-27 Thread Oleg Nesterov
What I am actually worried about is Tejun's rework, I am not sure cmwq has the "this thread services that wq" property... On 05/27, Sridhar Samudrala wrote: > > On Thu, 2010-05-27 at 14:44 +0200, Oleg Nesterov wrote: > > > > Instead, cgroup.c (or whoever needs this) can do > > > > struct move_

Re: [PATCH 2/3] workqueue: Add an API to create a singlethread workqueue attached to the current task's cgroup

2010-05-27 Thread Tejun Heo
Hello, On 05/27/2010 06:39 PM, Michael S. Tsirkin wrote: >> Unless you're gonna convert every driver to use this >> special kind of workqueue (and what happens when multiple tasks from >> different cgroups share the driver?), > > We'll then create a workqueue per task. Each workqueue will have th

Re: [PATCH 2/3] workqueue: Add an API to create a singlethread workqueue attached to the current task's cgroup

2010-05-27 Thread Michael S. Tsirkin
On Thu, May 27, 2010 at 09:24:18AM -0700, Sridhar Samudrala wrote: > On Thu, 2010-05-27 at 14:44 +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 w

Re: [PATCH 2/3] workqueue: Add an API to create a singlethread workqueue attached to the current task's cgroup

2010-05-27 Thread Michael S. Tsirkin
On Thu, May 27, 2010 at 06:15:54PM +0200, Tejun Heo wrote: > Hello, > > On 05/27/2010 03:12 PM, Michael S. Tsirkin wrote: > >> 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

Re: [PATCH 2/3] workqueue: Add an API to create a singlethread workqueue attached to the current task's cgroup

2010-05-27 Thread Sridhar Samudrala
On Thu, 2010-05-27 at 14:44 +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. > >

Re: [PATCH 2/3] workqueue: Add an API to create a singlethread workqueue attached to the current task's cgroup

2010-05-27 Thread Tejun Heo
Hello, On 05/27/2010 03:12 PM, Michael S. Tsirkin wrote: >> 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

Re: [PATCH 2/3] workqueue: Add an API to create a singlethread workqueue attached to the current task's cgroup

2010-05-27 Thread Oleg Nesterov
On 05/27, Michael S. Tsirkin wrote: > > 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

Re: [PATCH 2/3] workqueue: Add an API to create a singlethread workqueue attached to the current task's cgroup

2010-05-27 Thread Michael S. Tsirkin
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 cpuma

Re: [PATCH 2/3] workqueue: Add an API to create a singlethread workqueue attached to the current task's cgroup

2010-05-27 Thread Oleg Nesterov
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

Re: [PATCH 2/3] workqueue: Add an API to create a singlethread workqueue attached to the current task's cgroup

2010-05-27 Thread Michael S. Tsirkin
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 2/3] workqueue: Add an API to create a singlethread workqueue attached to the current task's cgroup

2010-05-18 Thread Sridhar Samudrala
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 diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h index 9466e86..6d6f301 100644 --- a/include/linux/workqueue.h +++ b/include/linux