Thread (10 messages) read the whole thread 10 messages, 4 authors, 2016-06-23

Re: [PATCH] cpuidle/powernv: Fix snooze timeout

From: Daniel Lezcano <hidden>
Date: 2016-06-23 10:01:59
Also in: linux-pm

On 06/23/2016 11:28 AM, Balbir Singh wrote:

[ ... ]
quoted
cpuidle_enter_state()
{
	[...]
	time_start = local_clock();
	[enter idle state]
	time_end = local_clock();
	/*
          * local_clock() returns the time in nanosecond, let's shift
          * by 10 (divide by 1024) to have microsecond based time.
          */
         diff = (time_end - time_start) >> 10;
	[...]
	dev->last_residency = (int) diff;
}

Because of >>10 as opposed to /1000, last_residency is lesser by 2.3%
I am surprised the last_residency is 2.3% exactly less. The difference 
between >>10 and /1000 is 2.34%.

What is the next target residency value ?

Does it solve the issue if you replace >>10 by /1000 ?



-- 
  <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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help