Messages in this thread | | | Date | Mon, 10 Nov 2014 13:41:11 +0100 | From | Peter Zijlstra <> | Subject | Re: [PATCH V3 2/6] sched: idle: cpuidle: Check the latency req before idle |
| |
On Fri, Nov 07, 2014 at 03:31:23PM +0100, Daniel Lezcano wrote: > @@ -216,19 +219,26 @@ static void cpu_idle_loop(void) > local_irq_disable(); > arch_cpu_idle_enter(); > > + latency_req = pm_qos_request(PM_QOS_CPU_DMA_LATENCY); > + > /* > * In poll mode we reenable interrupts and spin. > * > + * If the latency req is zero, we don't want to > + * enter any idle state and we jump to the poll > + * function directly > + * > * Also if we detected in the wakeup from idle > * path that the tick broadcast device expired > * for us, we don't want to go deep idle as we > * know that the IPI is going to arrive right > * away > */ > - if (cpu_idle_force_poll || tick_check_broadcast_expired()) > + if (!latency_req || cpu_idle_force_poll || > + tick_check_broadcast_expired()) > cpu_idle_poll();
Is this why you wanted that weak poll function?
Should we not instead allow an arch to deal with !latency_req and only fall back to this polling if there is no actual way for it to implement this better?
| |