On Tue, 06 May 2014 23:33:03 +0530 "Srivatsa S. Bhat" 
<srivatsa.b...@linux.vnet.ibm.com> wrote:

> --- a/kernel/stop_machine.c
> +++ b/kernel/stop_machine.c
> @@ -165,12 +165,21 @@ static void ack_state(struct multi_stop_data *msdata)
>               set_state(msdata, msdata->state + 1);
>  }
>  
> +/* Holding area for active CPUs, to let all the non-active CPUs go first */
> +static void hold_active_cpus(struct multi_stop_data *msdata,
> +                          int num_active_cpus)
> +{
> +     /* Wait until all the non-active threads ack the state */
> +     while (atomic_read(&msdata->thread_ack) > num_active_cpus)
> +             cpu_relax();
> +}

The code comments are a bit lame.  Can we do a better job of explaining
the overall dynamic behaviour?  Help readers to understand the problem
which hold_active_cpus() is solving and how it solves it?


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

Reply via email to