Re: [PATCH 1/3] cpuidle: Store the idle start time stamp
From: Daniel Lezcano
Date: Wed Apr 15 2015 - 08:50:47 EST
On 04/15/2015 02:42 PM, Peter Zijlstra wrote:
On Wed, Apr 15, 2015 at 02:29:06PM +0200, Daniel Lezcano wrote:
On 04/15/2015 12:20 PM, Peter Zijlstra wrote:
On Wed, Apr 15, 2015 at 12:00:22PM +0200, Daniel Lezcano wrote:
+ target_state->idle_stamp = ktime_to_us(ktime_get());
Hmm, sounds like I missed we are dealing with different units (us / ns) in
cpuidle / sched.
Would it make sense to store the time into a ktime structure instead and use
the relevant function depending on the place we are inspecting the value
Why would you ever want to use us? Does ARM enjoy calculating /1000?
Ah, I see the !scalar ktime got whacked, good! At which point the u64 ns
and ktime are the same. That said I prefer the u64 over ktime because
its easier to manipulate.
Ok. I was trying to save one variable on the stack by reusing the
idle_stamp value but if we store it in a different unit, then we have to
keep it in order to have usecond for the governors.
I was thinking about converting to nanosecond the cpuidle framework but
it is not worth to do that as the resolution is too high for the idle
<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 |
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/