On Fri, Oct 24, 2008 at 03:25:09PM +0200, Oleg Nesterov wrote:
No, we don't have that rule!
Because using Rusty's function with a seperate workqueue,
we queue the work item as follows:
get_online_cpus();
queue_work_on(cpu, &on_each_cpu_wq, &wfc.work);
flush_work(&wfc.work);
put_online_cpus();
The very fact that we've successfully queued the work-item means that
no cpu-hotplug operation can occur till our work item finishes
execution.
Hence the work can use get_online_cpus()!
Yes, we end up using additional resources in the form of another per-cpu
threads. But is that so much of an issue?
--
Thanks and Regards
gautham
--