Messages in this thread | | | Date | Fri, 24 Oct 2008 12:51:32 +0200 | From | Oleg Nesterov <> | Subject | Re: do_boot_cpu can deadlock? |
| |
On 10/24, Gautham R Shenoy wrote: > > On Fri, Oct 24, 2008 at 11:33:42AM +0200, Oleg Nesterov wrote: > > > But let's suppose we boot with maxcpus=1, and then bring up another CPU. > > Or we really add the new physical CPU (I don't really know if this is > > possible on x86). > > Even I am not sure if physical hotplug is possible. > > But think about the virtualization case when we want to add > additional CPU to a KVM guest at runtime? This > is not such a rare use-case. It could dead-lock that time, No?
virtualization/KVM is a black magic to me ;) I don't know how/if it is possible to add CPU at runtime.
Anyway, booting with maxcpus=1 allows us to bring up another CPU later, and idle_thread_array[cpu] == NULL in that case, yes?
Perhaps smp_prepare_cpus() can do fork_idle() for_each_possible_cpu() ? Or we can change do_boot_cpu() to use kthread_run() to create the idle thread.
Oleg.
| |