> +    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.
_______________________________________________
openib-general mailing list
[email protected]
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to