Skip to contentSkip to conversation

cpufreq/intel_pstate: Set timer timeout correctly

PATCH In review [email protected] 4 participants 4 messages Apr 4, 2013 – Apr 5, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cpufreq/intel_pstate: Set timer timeout correctly

From: Dirk Brandewie <[email protected]>

The current calculation of the delay time is wrong and a cut and paste error from a previous experimental driver. This can result in the timeout being set to jiffies + 1 which setup the driver to race with it's self if the apic timer interrupt happen at just the right time.

https://bugzilla.redhat.com/show_bug.cgi?id=920289

---
 drivers/cpufreq/intel_pstate.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
drivers/cpufreq/intel_pstate.c +0 -1
index 43ffe1c..4d6b988 100644
@@ -502,7 +502,6 @@ static inline void intel_pstate_set_sample_time(struct cpudata *cpu)
 
 	sample_time = cpu->pstate_policy->sample_rate_ms;
 	delay = msecs_to_jiffies(sample_time);
-	delay -= jiffies % delay;
 	mod_timer_pinned(&cpu->timer, jiffies + delay);
 }
 
Signature · 1 line
1.7.7.6
maintainer
#1 lore raw
Quoted 10 lines · On Thu, Apr 4, 2013 at 11:05 PM, <[email protected]> wrote:

From: Dirk Brandewie <[email protected]>

The current calculation of the delay time is wrong and a cut and paste error from a previous experimental driver. This can result in the timeout being set to jiffies + 1 which setup the driver to race with it's self if the apic timer interrupt happen at just the right time.

https://bugzilla.redhat.com/show_bug.cgi?id=920289

Quoted 7 lines
---
 drivers/cpufreq/intel_pstate.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

Looks fine, but I would like to see a Tested-by from Adam/Parag as they haven't said anything about this patch (even in bugzilla).

#2 lore raw
Quoted 14 lines · Viresh Kumar
Quoted 13 lines · On Thu, Apr 4, 2013 at 11:05 PM, <[email protected]> wrote:

From: Dirk Brandewie <[email protected]>

The current calculation of the delay time is wrong and a cut and paste error from a previous experimental driver. This can result in the timeout being set to jiffies + 1 which setup the driver to race with it's self if the apic timer interrupt happen at just the right time.

https://bugzilla.redhat.com/show_bug.cgi?id=920289

Quoted 7 lines
Quoted 4 lines
---
  drivers/cpufreq/intel_pstate.c |    1 -
  1 files changed, 0 insertions(+), 1 deletions(-)

Looks fine, but I would like to see a Tested-by from Adam/Parag as they haven't said anything about this patch (even in bugzilla).

I'll try. Note the bug is not reliably reproducible, all I can really do is run for a day or two and see if it crashes.

Signature · 4 lines
Adam Williamson
Fedora QA Community Monkey
IRC: adamw | Twitter: AdamW_Fedora | identi.ca: adamwfedora
http://www.happyassassin.net
#3 lore raw
In reply to Viresh Kumar
Quoted 14 lines · Viresh Kumar
Quoted 13 lines · On Thu, Apr 4, 2013 at 11:05 PM, <[email protected]> wrote:

From: Dirk Brandewie <[email protected]>

The current calculation of the delay time is wrong and a cut and paste error from a previous experimental driver. This can result in the timeout being set to jiffies + 1 which setup the driver to race with it's self if the apic timer interrupt happen at just the right time.

https://bugzilla.redhat.com/show_bug.cgi?id=920289

Quoted 8 lines
Quoted 4 lines
---
 drivers/cpufreq/intel_pstate.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

Looks fine, but I would like to see a Tested-by from Adam/Parag as they haven't said anything about this patch (even in bugzilla).

I am running with the patch since yesterday - everything looks good.

The issue hasn't been reproducible on demand but some code reading and Dirk's explanation says the patch should fix the issue.

So - Tested-by: Parag Warudkar <[email protected]>

Parag