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

2016-06-23 Thread Daniel Lezcano
On 06/23/2016 03:35 PM, Shreyas B Prabhu wrote: On 06/23/2016 03:31 PM, Daniel Lezcano wrote: On 06/23/2016 11:28 AM, Balbir Singh wrote: [ ... ] cpuidle_enter_state() { [...] time_start = local_clock(); [enter idle state] time_end = local_clock(); /* *

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

2016-06-23 Thread Shreyas B Prabhu
On 06/23/2016 03:31 PM, Daniel Lezcano wrote: > 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()

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

2016-06-23 Thread Daniel Lezcano
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

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

2016-06-23 Thread Balbir Singh
>> This is still a rounding error but at a different site. I see we saved >> a division by doing a >> 10, but we added it right back by doing a /20 >> later in the platform code. > > While a >> 10 is done at every idle exit, div by 20 is done once during > boot, so this doesn't negate the previous

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

2016-06-23 Thread Shreyas B Prabhu
On 06/23/2016 02:58 PM, Balbir Singh wrote: > > > On 23/06/16 14:58, Shreyas B Prabhu wrote: >> >> >> On 06/23/2016 05:18 AM, Balbir Singh wrote: >>> >>> >>> On 23/06/16 05:36, Shreyas B. Prabhu wrote: Snooze is a poll idle state in powernv and pseries platforms. Snooze has a timeout

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

2016-06-23 Thread Balbir Singh
On 23/06/16 14:58, Shreyas B Prabhu wrote: > > > On 06/23/2016 05:18 AM, Balbir Singh wrote: >> >> >> On 23/06/16 05:36, Shreyas B. Prabhu wrote: >>> Snooze is a poll idle state in powernv and pseries platforms. Snooze >>> has a timeout so that if a cpu stays in snooze for more than target >>>

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

2016-06-22 Thread Shreyas B Prabhu
On 06/23/2016 05:18 AM, Balbir Singh wrote: > > > On 23/06/16 05:36, Shreyas B. Prabhu wrote: >> Snooze is a poll idle state in powernv and pseries platforms. Snooze >> has a timeout so that if a cpu stays in snooze for more than target >> residency of the next available idle state, then it

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

2016-06-22 Thread Balbir Singh
On 23/06/16 05:36, Shreyas B. Prabhu wrote: > Snooze is a poll idle state in powernv and pseries platforms. Snooze > has a timeout so that if a cpu stays in snooze for more than target > residency of the next available idle state, then it would exit thereby > giving chance to the cpuidle

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

2016-06-22 Thread Rafael J. Wysocki
On Wed, Jun 22, 2016 at 9:36 PM, Shreyas B. Prabhu wrote: > Snooze is a poll idle state in powernv and pseries platforms. Snooze > has a timeout so that if a cpu stays in snooze for more than target > residency of the next available idle state, then it would exit

[PATCH] cpuidle/powernv: Fix snooze timeout

2016-06-22 Thread Shreyas B. Prabhu
Snooze is a poll idle state in powernv and pseries platforms. Snooze has a timeout so that if a cpu stays in snooze for more than target residency of the next available idle state, then it would exit thereby giving chance to the cpuidle governor to re-evaluate and promote the cpu to a deeper idle