[PATCH] ppc64 cpu hotplug

Nathan Lynch nathanl at austin.ibm.com
Thu Mar 25 09:28:24 EST 2004


jschopp at austin.ibm.com wrote:
> check_dr_state has a built it 5 second timeout so it doesn't keep retrying
> forever.  rtas_get_sensor will keep trying forever.  I am not opposed to
> using rtas_get_sensor (though we should change it to check 9900..9905
> instead of 9900..9909 for extended delay).

Ah, that is an important difference.  Looks as if we should implement an
rtas_get_sensor_timeout() interface that allows the caller to specify a
timeout value.  And I believe you're right about the range for extended
delay.  I think we could move check_dr_state to rtas.c (along with your
fix) and tweak it for this purpose.

> +               while (nr_threads--) {
> +                       if (0 == query_cpu_stopped(tid[nr_threads])) {
> +                               best = tid[nr_threads];
> +                               if (best == old_hwindex)
>                                         goto out;
>
> This part is a little hard to read.  I actually had to think about
> nr_threads being 1 for the while and 0 for the indexing tid.  If you clean
> this bit up to be more readable I will love the patch.

Yeah I guess a traditional "for" loop would be nicer.  I'll resubmit
once we're able to test that bit.

Nathan

** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc64-dev mailing list