Re: [PATCH] workqueue: clear workers of a pool after the CPU is offline

2013-07-26 Thread Tejun Heo
On Sat, Jul 27, 2013 at 12:55:12AM +0800, Lai Jiangshan wrote: > but sometimes the cpu is offline for long time. > and maybe the adminstrator want to reclaim the resource.. > > Add a boot option or sysfs switch? No, we don't do that to save 64k. -- tejun -- To unsubscribe from this list: send t

Re: [PATCH] workqueue: clear workers of a pool after the CPU is offline

2013-07-26 Thread Lai Jiangshan
On Fri, Jul 26, 2013 at 6:22 PM, Tejun Heo wrote: > On Fri, Jul 26, 2013 at 11:47:04AM +0800, Lai Jiangshan wrote: >> any worker can't kill itself. >> managers always tries to leave 2 workers. >> >> so the workers of the offline cpu pool can't be totally destroyed. > > But we *do* want to keep the

Re: [PATCH] workqueue: clear workers of a pool after the CPU is offline

2013-07-26 Thread Tejun Heo
On Fri, Jul 26, 2013 at 11:47:04AM +0800, Lai Jiangshan wrote: > any worker can't kill itself. > managers always tries to leave 2 workers. > > so the workers of the offline cpu pool can't be totally destroyed. But we *do* want to keep them around as CPUs taken offline are likely to come online at

Re: [PATCH] workqueue: clear workers of a pool after the CPU is offline

2013-07-25 Thread Lai Jiangshan
On 07/26/2013 11:07 AM, Tejun Heo wrote: > Hello, > > On Fri, Jul 26, 2013 at 10:13:25AM +0800, Lai Jiangshan wrote: >>> Hmmm... if I'm not confused, now the cpu pools just behave like a >>> normal unbound pool when the cpu goes down, >> >> cpu pools are always referenced, they don't behave like u

Re: [PATCH] workqueue: clear workers of a pool after the CPU is offline

2013-07-25 Thread Tejun Heo
Hello, On Fri, Jul 26, 2013 at 10:13:25AM +0800, Lai Jiangshan wrote: > > Hmmm... if I'm not confused, now the cpu pools just behave like a > > normal unbound pool when the cpu goes down, > > cpu pools are always referenced, they don't behave like unbound pool. Yeah sure, they don't get destroye

Re: [PATCH] workqueue: clear workers of a pool after the CPU is offline

2013-07-25 Thread Lai Jiangshan
On 07/25/2013 11:31 PM, Tejun Heo wrote: > Hello, Lai. > > On Thu, Jul 25, 2013 at 06:52:02PM +0800, Lai Jiangshan wrote: >> The unbound pools and their workers can be destroyed/cleared >> when their refcnt become zero. But the cpu pool can't be destroyed >> due to they are always referenced, thei

Re: [PATCH] workqueue: clear workers of a pool after the CPU is offline

2013-07-25 Thread Tejun Heo
Hello, Lai. On Thu, Jul 25, 2013 at 06:52:02PM +0800, Lai Jiangshan wrote: > The unbound pools and their workers can be destroyed/cleared > when their refcnt become zero. But the cpu pool can't be destroyed > due to they are always referenced, their refcnt are always > 0. > > We don't want to des

[PATCH] workqueue: clear workers of a pool after the CPU is offline

2013-07-25 Thread Lai Jiangshan
The unbound pools and their workers can be destroyed/cleared when their refcnt become zero. But the cpu pool can't be destroyed due to they are always referenced, their refcnt are always > 0. We don't want to destroy the cpu pools, but we want to destroy the workers of the pool when the pool is fu

[PATCH] workqueue: clear workers of a pool after the CPU is offline

2013-02-20 Thread Lai Jiangshan
After we removed the trustee_thread(), the workers of a pool can't be totally clear after the CPU is offline. And in future, we will introduce non-std pools, but we still have no way to clear workers before we try to free the non-std pools. We add offline_pool() and POOL_OFFLINE flag to do so. 1