Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 885899 Details for
Bug 1082080
RHEL7 CPUScaling Userspace Governor Failure
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
cpuscaling test patch to use /sys/../available-frequencies if present
0002-1082080-RHEL7-CPUScaling-Userspace-Governor-Failure.patch (text/plain), 12.19 KB, created by
Greg Nichols
on 2014-04-13 18:23:41 UTC
(
hide
)
Description:
cpuscaling test patch to use /sys/../available-frequencies if present
Filename:
MIME Type:
Creator:
Greg Nichols
Created:
2014-04-13 18:23:41 UTC
Size:
12.19 KB
patch
obsolete
>From 9b2f1e7336cc5017c677c82bee7b4b70a53b6622 Mon Sep 17 00:00:00 2001 >From: Greg Nichols <gnichols@redhat.com> >Date: Sun, 13 Apr 2014 14:22:22 -0400 >Subject: [PATCH 2/2] 1082080 - RHEL7 CPUScaling Userspace Governor Failure > >--- > tests/cpuscaling/cpuscaling.py | 74 +++++++++++++++++++++++------------------- > tests/cpuscaling/syscpufreq.py | 10 ++++++ > 2 files changed, 50 insertions(+), 34 deletions(-) > >diff --git a/tests/cpuscaling/cpuscaling.py b/tests/cpuscaling/cpuscaling.py >index cd8c9df..c5dacac 100644 >--- a/tests/cpuscaling/cpuscaling.py >+++ b/tests/cpuscaling/cpuscaling.py >@@ -202,6 +202,18 @@ class CPUScalingTest(Test): > > return True > >+ def getMinimumFrequency(self): >+ if self.sysCPUFreq.getMinimumFrequency(): >+ return self.sysCPUFreq.getMinimumFrequency() >+ # otherwise >+ return self.cpuPower.getMinimumFrequency() >+ >+ def getMaximumFrequency(self): >+ if self.sysCPUFreq.getMaximumFrequency(): >+ return self.sysCPUFreq.getMaximumFrequency() >+ # otherwise >+ return self.cpuPower.getMaximumFrequency() >+ > def minimumRequiredSpeedup(self): > return self.predictedSpeedup - ((self.predictedSpeedup - 1.00)*self.speedUpTolerance/100.0) > >@@ -333,11 +345,10 @@ class CPUScalingTest(Test): > sys.stdout.flush() > time.sleep(waitTime) > sys.stdout.write(" done.\n") >- minimumFrequency = self.cpuPower.getMinimumFrequency() > currentFrequency = self.cpuPower.getCurrentFrequency(self.sysCPUFreq.getCPUs(self.currentPackage)[0]) > if self.debug != Constants.off: >- print "%s vs. %s (min.)" % (currentFrequency, minimumFrequency) >- if not minimumFrequency or not currentFrequency or not self.checkFrequency(minimumFrequency, currentFrequency): >+ print "%s vs. %s (min.)" % (currentFrequency, self.getMinimumFrequency()) >+ if not self.getMinimumFrequency() or not currentFrequency or not self.checkFrequency(self.getMinimumFrequency(), currentFrequency): > return False > > # otherwise >@@ -485,21 +496,20 @@ class CPUScalingTest(Test): > self.differenceSpeedUp = None > success = True > print "Setting governor to %s" % governor >- if not self.cpuPower.setPolicy(self.cpuPower.getMinimumFrequency(), self.cpuPower.getMaximumFrequency(), governor): >+ if not self.cpuPower.setPolicy(self.getMinimumFrequency(), self.getMaximumFrequency(), governor): > success = False > > # 7. Set the the cpu speed to it's lowest value > currentFrequency = self.cpuPower.getCurrentFrequency(self.sysCPUFreq.getCPUs(self.currentPackage)[0]) >- minimumFrequency = self.cpuPower.getMinimumFrequency() > if currentFrequency: >- print "Changing cpu frequency from %u to %u MHz" % (int(currentFrequency/1000), int(minimumFrequency/1000)) >+ print "Changing cpu frequency from %u to %u MHz" % (int(currentFrequency/1000), int(self.getMinimumFrequency()/1000)) > else: >- print "Setting cpu frequency to %u MHz" % (int(minimumFrequency/1000)) >+ print "Setting cpu frequency to %u MHz" % (int(self.getMinimumFrequency()/1000)) > if governor == "userspace": >- if not self.cpuPower.setFrequency(minimumFrequency): >+ if not self.cpuPower.setFrequency(self.getMinimumFrequency()): > success = False > else: # powersave - set min and max to hardware min. >- if not self.cpuPower.setPolicy(minimumFrequency, minimumFrequency, "powersave"): >+ if not self.cpuPower.setPolicy(self.getMinimumFrequency(), self.getMinimumFrequency(), "powersave"): > success = False > self.currentWorkload = "minimum" > sys.stdout.flush() >@@ -507,13 +517,11 @@ class CPUScalingTest(Test): > # 8. Verify the speed is set to the lowest value by comparing ~/scaling_min_freq to ~/scaling_cur_freq > # if not, it's a warning - the frequency will be checked again after running the load. > currentFrequency = self.cpuPower.getCurrentFrequency(self.sysCPUFreq.getCPUs(self.currentPackage)[0]) >- minimumFrequency = self.cpuPower.getMinimumFrequency() >- if not minimumFrequency or not currentFrequency or not self.checkFrequency(minimumFrequency, currentFrequency): >- print "Warning: Could not verify that cpu frequency is set to the minimum value of %s KHz" % minimumFrequency >+ if not self.getMinimumFrequency() or not currentFrequency or not self.checkFrequency(self.getMinimumFrequency(), currentFrequency): >+ print "Warning: Could not verify that cpu frequency is set to the minimum value of %s KHz" % self.getMinimumFrequency() > # calculate predicted speedup for the package >- maximumFrequency = self.cpuPower.getMaximumFrequency() > try: >- self.predictedSpeedup = float(maximumFrequency)/float(minimumFrequency) >+ self.predictedSpeedup = float(self.getMaximumFrequency())/float(self.getMinimumFrequency()) > except Exception, e: > print "Error: could not determine predicted speedup" > print e >@@ -529,25 +537,24 @@ class CPUScalingTest(Test): > print "Minumum frequency average load test time: %.2f" % self.minimumFrequencyTestTime > > # 10.5 check that measured frequency is near minimum >- if not self.checkFrequencyResults(minimumFrequency): >+ if not self.checkFrequencyResults(self.getMinimumFrequency()): > success = False > > # 11. Set the cpu speed to it's highest value as above. >- maximumFrequency = self.cpuPower.getMaximumFrequency() > currentFrequency = self.cpuPower.getCurrentFrequency(self.sysCPUFreq.getCPUs(self.currentPackage)[0]) > if governor == "userspace": >- print "Changing cpu frequency from %u to %u MHz" % (int(currentFrequency/1000), int(maximumFrequency/1000)) >- if not self.cpuPower.setFrequency(maximumFrequency): >+ print "Changing cpu frequency from %u to %u MHz" % (int(currentFrequency/1000), int(self.getMaximumFrequency()/1000)) >+ if not self.cpuPower.setFrequency(self.getMaximumFrequency()): > success = False > else: # powersave - set min and max to hardware max. >- print "Changing cpu frequency from %u to %u MHz, performance governor" % (int(currentFrequency/1000), int(maximumFrequency/1000)) >- if not self.cpuPower.setPolicy(maximumFrequency, maximumFrequency, "performance"): >+ print "Changing cpu frequency from %u to %u MHz, performance governor" % (int(currentFrequency/1000), int(self.getMaximumFrequency()/1000)) >+ if not self.cpuPower.setPolicy(self.getMaximumFrequency(), self.getMaximumFrequency(), "performance"): > success = False > self.currentWorkload = "maximum" > > currentFrequency = self.cpuPower.getCurrentFrequency(self.sysCPUFreq.getCPUs(self.currentPackage)[0]) >- if not maximumFrequency or not currentFrequency or not self.checkFrequency(maximumFrequency, currentFrequency): >- print "Warning: Could not verify that cpu frequency %s MHzis set to the maximum value of %s MHz" % (int(currentFrequency/1000), int(maximumFrequency/1000)) >+ if not self.getMaximumFrequency() or not currentFrequency or not self.checkFrequency(self.getMaximumFrequency(), currentFrequency): >+ print "Warning: Could not verify that cpu frequency %s MHzis set to the maximum value of %s MHz" % (int(currentFrequency/1000), int(self.getMaximumFrequency()/1000)) > > # 12. Repeat workload test, record timing > self.maximumFrequencyTestTime = self.runLoadTest() >@@ -556,7 +563,7 @@ class CPUScalingTest(Test): > print "Maximum frequency average load test time: %.2f" % self.maximumFrequencyTestTime > > # 12.5 check the measured max measured freqency is >= stated max >- if not self.checkFrequencyResults(maximumFrequency, unlimitedMaximum=True): >+ if not self.checkFrequencyResults(self.getMaximumFrequency(), unlimitedMaximum=True): > success = False > > # 13. Verify MHz increase is comparable to time % decrease( eg. slow MHz/fast MHz ~= fast time/slow time; >@@ -593,11 +600,10 @@ class CPUScalingTest(Test): > self.currentWorkload = "performance" > > # 21. Verify the current speed is the same as scaling_max_freq >- maximumFrequency = self.cpuPower.getMaximumFrequency() # KHz > currentFrequency = self.cpuPower.getCurrentFrequency(self.sysCPUFreq.getCPUs(self.currentPackage)[0]) # KHz > >- if not maximumFrequency or not currentFrequency or not self.checkFrequency(maximumFrequency, currentFrequency): >- print "Warning: Current cpu frequency of %s KHz is not set to the maximum value of %s KHz" % (currentFrequency, maximumFrequency) >+ if not self.getMaximumFrequency() or not currentFrequency or not self.checkFrequency(self.getMaximumFrequency(), currentFrequency): >+ print "Warning: Current cpu frequency of %s KHz is not set to the maximum value of %s KHz" % (currentFrequency, self.getMaximumFrequency()) > > # 22. Repeat workload test, record timing, also verify frequency does not drop during run > self.performanceTestTime = self.runLoadTest() >@@ -607,7 +613,7 @@ class CPUScalingTest(Test): > print "Performance load test time: %.2f" % self.performanceTestTime > > # 22.5 check EFI freq vs. max >- if not self.checkFrequencyResults(maximumFrequency, unlimitedMaximum=True): >+ if not self.checkFrequencyResults(self.getMaximumFrequency(), unlimitedMaximum=True): > success = False > > # 23. Compare the timing to the max results for a self.speedUpTolerance delta >@@ -635,14 +641,14 @@ class CPUScalingTest(Test): > > # set the policy for max boost freq if available > if self.debug != Constants.off: >- print "Max: %s MHz vs. Max Boost: %s MHz" % (self.cpuPower.getMaximumFrequency(), self.cpuPower.getMaximumBoostFrequency()) >- maximumFrequency = self.cpuPower.getMaximumFrequency() >- if self.cpuPower.getMaximumBoostFrequency() and self.cpuPower.getMaximumBoostFrequency() > maximumFrequency: >+ print "Max: %s MHz vs. Max Boost: %s MHz" % (self.getMaximumFrequency(), self.cpuPower.getMaximumBoostFrequency()) >+ maximumFrequency = self.getMaximumFrequency() >+ if self.cpuPower.getMaximumBoostFrequency() and self.cpuPower.getMaximumBoostFrequency() > self.getMaximumFrequency(): > print "Using maximum boost frequency." > maximumFrequency = self.cpuPower.getMaximumBoostFrequency() > >- print "Setting governor to %s (min: %s MHz, max: %s MHz)" % ( governor,self.cpuPower.getMinimumFrequency()/1000, maximumFrequency/1000) >- if not self.cpuPower.setPolicy(self.cpuPower.getMinimumFrequency(), maximumFrequency, governor): >+ print "Setting governor to %s (min: %s MHz, max: %s MHz)" % ( governor,self.getMinimumFrequency()/1000, maximumFrequency/1000) >+ if not self.cpuPower.setPolicy(self.getMinimumFrequency(), maximumFrequency, governor): > success = False > self.currentWorkload = governor > >@@ -741,8 +747,8 @@ class CPUScalingTest(Test): > print "-------- -------------- -------------- --------------" > > # expected values >- minimumFrequency = int(self.cpuPower.getMinimumFrequency())/1000 >- maximumFrequency = int(self.cpuPower.getMaximumFrequency())/1000 >+ minimumFrequency = int(self.getMinimumFrequency())/1000 >+ maximumFrequency = int(self.getMaximumFrequency())/1000 > print "expected %5u MHz %5u MHz %5u MHz" % (minimumFrequency, maximumFrequency, maximumFrequency) > > #actual values, one row per cpu >diff --git a/tests/cpuscaling/syscpufreq.py b/tests/cpuscaling/syscpufreq.py >index 10040dc..604195c 100644 >--- a/tests/cpuscaling/syscpufreq.py >+++ b/tests/cpuscaling/syscpufreq.py >@@ -215,6 +215,16 @@ class SysCPUFreq(): > def isValid(self): > return self.isSupported() > >+ def getMinimumFrequency(self): >+ if self.frequencies: >+ return self.frequencies[0] >+ return None >+ >+ def getMaximumFrequency(self): >+ if self.frequencies: >+ return self.frequencies[-1] >+ return None >+ > > def showCapabilities(self): > >-- >1.9.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1082080
:
879916
|
879983
| 885899 |
886314
|
886315
|
886900
|
886919
|
886920
|
886922
|
886970