On Thu, 10 Mar 2005, Andi Kleen wrote: > 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)
A bit subtle, the cpus_and will clear the offline processors after the first pass. - 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/