* Re: [openib-general] [PATCH 06/16] ehca: interrupt handling routines
[not found] <4468BD63.6070509@de.ibm.com>
@ 2006-05-26 20:06 ` Roland Dreier
0 siblings, 0 replies; only message in thread
From: Roland Dreier @ 2006-05-26 20:06 UTC (permalink / raw)
To: Heiko J Schick
Cc: openib-general, Christoph Raisch, Hoang-Nam Nguyen, Marcus Eder,
linux-kernel, linuxppc-dev
> + 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.
^ permalink raw reply [flat|nested] only message in thread