linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: Balbir Singh <bsingharora@gmail.com>,
	Shreyas B Prabhu <shreyas@linux.vnet.ibm.com>,
	rjw@rjwysocki.net
Cc: linux-pm@vger.kernel.org, anton@samba.org, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] cpuidle/powernv: Fix snooze timeout
Date: Thu, 23 Jun 2016 12:01:57 +0200	[thread overview]
Message-ID: <576BB395.5050502@linaro.org> (raw)
In-Reply-To: <576BABC5.7020600@gmail.com>

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

[ ... ]

>> 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

  parent reply	other threads:[~2016-06-23 10:02 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-22 19:36 [PATCH] cpuidle/powernv: Fix snooze timeout Shreyas B. Prabhu
2016-06-22 22:49 ` Rafael J. Wysocki
2016-06-22 23:48 ` Balbir Singh
2016-06-23  4:58   ` Shreyas B Prabhu
2016-06-23  9:28     ` Balbir Singh
2016-06-23  9:41       ` Shreyas B Prabhu
2016-06-23  9:55         ` Balbir Singh
2016-06-23 10:01       ` Daniel Lezcano [this message]
2016-06-23 13:35         ` Shreyas B Prabhu
2016-06-23 14:36           ` Daniel Lezcano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=576BB395.5050502@linaro.org \
    --to=daniel.lezcano@linaro.org \
    --cc=anton@samba.org \
    --cc=bsingharora@gmail.com \
    --cc=linux-pm@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=rjw@rjwysocki.net \
    --cc=shreyas@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).