[openib-general] [PATCH 06/16] ehca: interrupt handling routines

Roland Dreier rdreier at cisco.com
Sat May 27 06:06:44 EST 2006


 > +	for_each_online_cpu(cpu) {
 > +		task = create_comp_task(pool, cpu);
 > +		if (task) {
 > +			kthread_bind(task, cpu);
 > +			wake_up_process(task);
 > +		}
 > +	}

How does this creation of a thread pool work with respect to CPU
hotplug?  What happens if a CPU goes away?  How about if only one CPU
is running when the driver is loaded, and then 15 more are hot-added?

 > +	for (i = 0; i < NR_CPUS; i++) {
 > +		if (cpu_online(i))
 > +			destroy_comp_task(pool, i);
 > +	}

And it seems in the destroy function, you will possibly leak threads
or try to kill a non-existent thread if the set of online CPUs has
changed since the driver started...

 - R.



More information about the Linuxppc-dev mailing list