Zwane Mwaikambo <[EMAIL PROTECTED]> writes:

> Andi noted that during normal runtime cpu_idle_map is bounced around a 
> lot, and occassionally at a higher frequency than the timer interrupt 
> wakeup which we normally exit pm_idle from. So switch to a percpu 
> variable. Andi i didn't move things to the slow path because it would 
> involve adding scheduler code to wakeup the idle thread on the cpus we're 
> waiting for.

Thanks. 
>  
> -
>  void cpu_idle_wait(void)
>  {
> -        int cpu;
> -        cpumask_t map;
> +     unsigned int cpu, this_cpu = get_cpu();
> +     cpumask_t map;
> +
> +     set_cpus_allowed(current, cpumask_of_cpu(this_cpu));
> +     put_cpu();

You need a cpus_clear(map); here I think (probably same for the other
archs) 

> +
> +     for_each_online_cpu(cpu) {
> +             per_cpu(cpu_idle_state, cpu) = 1;
> +             cpu_set(cpu, map);
> +     }



-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
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