On PowerNV platforms, firmware provides exit latency and
target residency for each of the idle states in nano
seconds. Cpuidle framework expects the values in micro
seconds. Round up to nearest micro seconds to avoid errors
in cases where the values are defined as fractional micro
seconds.
Default idle state of 'snooze' has exit latency of zero. If
other states have fractional micro second exit latency, they
would get rounded down to zero micro second and make cpuidle
framework choose deeper idle state when snooze loop is the
right choice.
Reported-by: Anton Blanchard <redacted>
Signed-off-by: Vaidyanathan Srinivasan <redacted>
---
drivers/cpuidle/cpuidle-powernv.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
From: Gautham R Shenoy <hidden> Date: 2017-08-24 04:35:33
Hi Vaidy,
On Thu, Aug 24, 2017 at 12:28:41AM +0530, Vaidyanathan Srinivasan
wrote:
Cc'ing Rafael and linux-pm list.
On PowerNV platforms, firmware provides exit latency and
target residency for each of the idle states in nano
seconds. Cpuidle framework expects the values in micro
seconds. Round up to nearest micro seconds to avoid errors
in cases where the values are defined as fractional micro
seconds.
Default idle state of 'snooze' has exit latency of zero. If
other states have fractional micro second exit latency, they
would get rounded down to zero micro second and make cpuidle
framework choose deeper idle state when snooze loop is the
right choice.
Reported-by: Anton Blanchard <redacted>
Signed-off-by: Vaidyanathan Srinivasan <redacted>
This looks good to me.
Reviewed-by: Gautham R. Shenoy <redacted>
From: Michael Ellerman <mpe@ellerman.id.au> Date: 2017-08-24 10:28:20
Vaidyanathan Srinivasan [off-list ref] writes:
On PowerNV platforms, firmware provides exit latency and
target residency for each of the idle states in nano
seconds. Cpuidle framework expects the values in micro
seconds. Round up to nearest micro seconds to avoid errors
in cases where the values are defined as fractional micro
seconds.
Default idle state of 'snooze' has exit latency of zero. If
other states have fractional micro second exit latency, they
would get rounded down to zero micro second and make cpuidle
framework choose deeper idle state when snooze loop is the
right choice.
Reported-by: Anton Blanchard <redacted>
Signed-off-by: Vaidyanathan Srinivasan <redacted>
This sounds like a fairly bad bug, does it need a Fixes / Cc stable tag?
cheers
* Michael Ellerman [off-list ref] [2017-08-24 20:28:19]:
Vaidyanathan Srinivasan [off-list ref] writes:
quoted
On PowerNV platforms, firmware provides exit latency and
target residency for each of the idle states in nano
seconds. Cpuidle framework expects the values in micro
seconds. Round up to nearest micro seconds to avoid errors
in cases where the values are defined as fractional micro
seconds.
Default idle state of 'snooze' has exit latency of zero. If
other states have fractional micro second exit latency, they
would get rounded down to zero micro second and make cpuidle
framework choose deeper idle state when snooze loop is the
right choice.
Reported-by: Anton Blanchard <redacted>
Signed-off-by: Vaidyanathan Srinivasan <redacted>
This sounds like a fairly bad bug, does it need a Fixes / Cc stable tag?
Yes, we will need this on stable kernel that runs on POWER9. On older
platforms the latencies are larger and hence no impact :)
I will post to stable after this fix hits your -next tree.
--Vaidy
From: Michael Ellerman <hidden> Date: 2017-11-14 11:12:00
On Wed, 2017-08-23 at 18:58:41 UTC, Vaidyanathan Srinivasan wrote:
On PowerNV platforms, firmware provides exit latency and
target residency for each of the idle states in nano
seconds. Cpuidle framework expects the values in micro
seconds. Round up to nearest micro seconds to avoid errors
in cases where the values are defined as fractional micro
seconds.
Default idle state of 'snooze' has exit latency of zero. If
other states have fractional micro second exit latency, they
would get rounded down to zero micro second and make cpuidle
framework choose deeper idle state when snooze loop is the
right choice.
Reported-by: Anton Blanchard <redacted>
Signed-off-by: Vaidyanathan Srinivasan <redacted>
Reviewed-by: Gautham R. Shenoy <redacted>