[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5460D6A6.9070501@linaro.org>
Date: Mon, 10 Nov 2014 16:15:50 +0100
From: Daniel Lezcano <daniel.lezcano@...aro.org>
To: Peter Zijlstra <peterz@...radead.org>
CC: rjw@...ysocki.net, preeti@...ux.vnet.ibm.com,
nicolas.pitre@...aro.org, linux-pm@...r.kernel.org,
linux-kernel@...r.kernel.org, linaro-kernel@...ts.linaro.org,
patches@...aro.org, lenb@...nel.org
Subject: Re: [PATCH V3 3/6] sched: idle: Get the next timer event and pass
it the cpuidle framework
On 11/10/2014 01:43 PM, Peter Zijlstra wrote:
> On Fri, Nov 07, 2014 at 03:31:24PM +0100, Daniel Lezcano wrote:
>> static void cpu_idle_loop(void)
>> {
>> - unsigned int latency_req;
>> + unsigned int latency_req, next_timer_event;
>>
>> while (1) {
>> /*
>> @@ -221,6 +222,9 @@ static void cpu_idle_loop(void)
>>
>> latency_req = pm_qos_request(PM_QOS_CPU_DMA_LATENCY);
>>
>> + next_timer_event =
>> + ktime_to_us(tick_nohz_get_sleep_length());
>> +
>> /*
>> * In poll mode we reenable interrupts and spin.
>> *
>> @@ -238,7 +242,8 @@ static void cpu_idle_loop(void)
>> tick_check_broadcast_expired())
>> cpu_idle_poll();
>> else
>> - cpuidle_idle_call(latency_req);
>> + cpuidle_idle_call(latency_req,
>> + next_timer_event);
>>
>> arch_cpu_idle_exit();
>> }
>
> Why do we want to query the next timer in the poll case? Afaict the
> other patches don't make use of this either.
Well, the direction I am taking when writing those cleanups is to have
something like:
"I will sleep X usec, I have Y usec latency constraints". Grouping the
latency req and the next timer allows to stick to the next changes.
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists