Re: [RFC patch 2/5] smpboot: Provide infrastructure for percpuhotplug threads

From: Thomas Gleixner
Date: Thu Jun 14 2012 - 04:44:58 EST


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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/