Messages in this thread | | | Date | Thu, 14 Jun 2012 10:44:55 +0200 (CEST) | From | Thomas Gleixner <> | Subject | Re: [RFC patch 2/5] smpboot: Provide infrastructure for percpu hotplug threads |
| |
On Thu, 14 Jun 2012, Srivatsa S. Bhat wrote: > On 06/13/2012 04:30 PM, Thomas Gleixner wrote: > > @@ -280,6 +280,7 @@ static int __ref _cpu_down(unsigned int > > __func__, cpu); > > goto out_release; > > } > > + smpboot_park_threads(cpu); > > > > > If cpu_down fails further down, don't we want to unpark these threads > as part of error recovery?
Right.
> > err = __stop_machine(take_cpu_down, &tcd_param, cpumask_of(cpu)); > > if (err) { > > @@ -354,6 +355,10 @@ static int __cpuinit _cpu_up(unsigned in > > goto out; > > } > > > > + ret = smpboot_create_threads(cpu); > > + if (ret) > > + goto out; > > + > > > Here also, we might want to clean up on error right?
Good question. If we failed to create a thread, we can't online the cpu, but we might try again later. So now the question is whether we really need to completely destroy the already created and parked ones or just leave them around. No real opinion on that, I just picked the lazy way :)
Thanks,
tglx
| |