Re: [PATCH 1/2] workqueues: shrink cpu_populated_map when CPU dies

2008-02-17 Thread Jarek Poplawski
On Mon, Feb 18, 2008 at 02:45:56AM +0300, Oleg Nesterov wrote: > On 02/17, Jarek Poplawski wrote: ... > > 1) ... workqueue_cpu_callback(...) ... > Yes, but this is harmless. cpu-hotplug callbacks are not time-critical, > and cpu_down/cpu_up happens not often, and LIST_HEAD(workqueues) is not > very

Re: [PATCH 1/2] workqueues: shrink cpu_populated_map when CPU dies

2008-02-17 Thread Oleg Nesterov
On 02/17, Jarek Poplawski wrote: > > This patch looks OK to me. Thanks for looking at this! > But while reading this I got some doubts > in nearby places, so BTW 2 small questions: > > 1) ... workqueue_cpu_callback(...) > { > ... > list_for_each_entry(wq, &workqueues, list) { >

Re: [PATCH 1/2] workqueues: shrink cpu_populated_map when CPU dies

2008-02-17 Thread Jarek Poplawski
Hi Oleg, This patch looks OK to me. But while reading this I got some doubts in nearby places, so BTW 2 small questions: 1) ... workqueue_cpu_callback(...) { ... list_for_each_entry(wq, &workqueues, list) { cwq = per_cpu_ptr(wq->cpu_wq, cpu); switc

[PATCH 1/2] workqueues: shrink cpu_populated_map when CPU dies

2008-02-16 Thread Oleg Nesterov
When cpu_populated_map was introduced, it was supposed that cwq->thread can survive after CPU_DEAD, that is why we never shrink cpu_populated_map. This is not very nice, we can safely remove the already dead CPU from the map. The only required change is that destroy_workqueue() must hold the hotpl