lkml.org 
[lkml]   [2014]   [Nov]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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?


\
 
 \ /
  Last update: 2014-11-10 14:21    [W:0.128 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site