Re: [PATCH 2/4] stop_machine: reimplement using cpuhog

From: Oleg Nesterov
Date: Mon Mar 08 2010 - 14:08:18 EST


On 03/09, Tejun Heo wrote:
>
> int __stop_machine(int (*fn)(void *), void *data, const struct cpumask *cpus)
> {
> ...
> + /* Set the initial state and hog all online cpus. */
> + set_state(&smdata, STOPMACHINE_PREPARE);
> + return hog_cpus(cpu_online_mask, stop_cpu, &smdata);
> }

Could you please confirm this is correct?

I am not sure I understand how the code looks with the patch applied,
but the lockless set_state() above can confuse another stop_machine()
in progress?

Oleg.

--
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/