r1104 - tags
by gnichols@fedoraproject.org
Author: gnichols
Date: 2011-09-23 14:48:20 +0000 (Fri, 23 Sep 2011)
New Revision: 1104
Added:
tags/v7-V1-4R30/
Log:
tag version
12 years, 7 months
r1103 - trunk
by gnichols@fedoraproject.org
Author: gnichols
Date: 2011-09-23 14:47:57 +0000 (Fri, 23 Sep 2011)
New Revision: 1103
Modified:
trunk/v7.spec.in
Log:
R30
Modified: trunk/v7.spec.in
===================================================================
--- trunk/v7.spec.in 2011-09-23 14:47:16 UTC (rev 1102)
+++ trunk/v7.spec.in 2011-09-23 14:47:57 UTC (rev 1103)
@@ -79,7 +79,7 @@
%changelog
* Wed Sep 21 2011 Greg Nichols <gnichols(a)redhat.com>
-V7 1.4 R29
+V7 1.4 R30
732113 - cpuscaling rewrite
12 years, 7 months
r1102 - trunk/tests/cpuscaling
by gnichols@fedoraproject.org
Author: gnichols
Date: 2011-09-23 14:47:16 +0000 (Fri, 23 Sep 2011)
New Revision: 1102
Modified:
trunk/tests/cpuscaling/cpuscaling.py
Log:
732113 - cpuscaling rewrite
Modified: trunk/tests/cpuscaling/cpuscaling.py
===================================================================
--- trunk/tests/cpuscaling/cpuscaling.py 2011-09-23 14:45:44 UTC (rev 1101)
+++ trunk/tests/cpuscaling/cpuscaling.py 2011-09-23 14:47:16 UTC (rev 1102)
@@ -327,59 +327,47 @@
# otherwise, set command has failed
return None
- def getFrequency(self, cpu=None, ignoreErrors=False):
+ def getFrequency(self, cpu=None):
if not cpu:
print "\nChecking current cpu frequency:"
- cpuInfoCurrentFreq = self.getPackageParameter("cpuinfo_cur_freq", logging=True, ignoreErrors=ignoreErrors)
- scalingCurrentFreq = self.getPackageParameter("scaling_cur_freq", logging=True, ignoreErrors=True)
+ cpuInfoCurrentFreq = self.getPackageParameter("cpuinfo_cur_freq", logging=True)
+ scalingCurrentFreq = self.getPackageParameter("scaling_cur_freq", logging=True)
# if cpuInfoCurrentFreq != scalingCurrentFreq:
# print "Warning: scaling_cur_freq is %s while cpuinfo_cur_freq is %s" % ( scalingCurrentFreq, cpuInfoCurrentFreq)
if cpuInfoCurrentFreq:
print "Using cpuinfo_cur_freq"
return cpuInfoCurrentFreq
- # otherwise
- # if scalingCurrentFreq:
- # print "Using scaling_cur_freq"
- # return scalingCurrentFreq
-
- self.logWorkloadError("Error: could not determine frequency")
+ self.logWorkloadError("Error: could not determine current package frequency")
return None
- else:
- print "\nChecking current frequency for cpu%s" % cpu
- cpuInfoCurrentFreq = self.getParameter(cpu, "cpuinfo_cur_freq", logging=True)
- scalingCurrentFreq = self.getParameter(cpu, "scaling_cur_freq", logging=True)
- if cpuInfoCurrentFreq:
- print "Using cpuinfo_cur_freq"
- return cpuInfoCurrentFreq
-
- # otherwise
- # if scalingCurrentFreq:
- # return scalingCurrentFreq
-
- self.logWorkloadError("Error: could not determine frequency")
- return None
+ # otherwise - single cpu
+ print "\nChecking current frequency for cpu%s" % cpu
+ cpuInfoCurrentFreq = self.getParameter(cpu, "cpuinfo_cur_freq", logging=True)
+ scalingCurrentFreq = self.getParameter(cpu, "scaling_cur_freq", logging=True)
+ if cpuInfoCurrentFreq:
+ print "Using cpuinfo_cur_freq"
+ return cpuInfoCurrentFreq
+
+ self.logWorkloadError("Error: could not determine current frequency")
+ return None
+
def setGovernor(self, governor):
return self.setPackageParameter("g", "scaling_governor", "scaling_governor", governor)
- def getPackageParameter(self, parameter, logging=False, ignoreErrors=False):
+ def getPackageParameter(self, parameter, logging=False):
packageParameterValue = None
- success = True
for cpu in self.packageToCpus[self.currentPackage]:
value = self.getParameter(cpu, parameter)
if logging:
print "cpu%s %s = %s" % (cpu, parameter, value)
if value and not packageParameterValue:
packageParameterValue = value
- elif value != packageParameterValue and not ignoreErrors:
- self.logWorkloadError("Error: cpu%s in package %s has the value %s which differs from other cpus in the package" % (cpu, self.currentPackage, value))
- success = False
- if success:
- return packageParameterValue
+ elif value != packageParameterValue:
+ print "Warning: cpu%s in package %s has the value %s which differs from other cpus in the package" % (cpu, self.currentPackage, value)
- return None
+ return packageParameterValue
def getParameter(self, cpu, parameter, logging=False):
value = None
@@ -479,7 +467,7 @@
print "process effective frequency: %u MHz" % (effectiveFrequency/1000)
self.setWorkloadEffectiveFreq(self.currentWorkload, cpu, effectiveFrequency)
else:
- print "Warning: could not determine effective frequency"
+ print "Warning: could not determine effective frequency"
totalProcessTime += runTime
del self.loadProcesses[cpu]
@@ -647,27 +635,32 @@
def turboBoostSupported(self):
return self.turboBoostSupport
- def checkEffectiveFrequency(self, requiredFrequency, unlimitedMaximum=False):
+ def checkFrequencyResults(self, requiredFrequency, unlimitedMaximum=False):
""" requiredFrequency: string, in KHz """
success = True
if self.effectiveFrequencySupport:
- for cpu in self.packageToCpus[self.currentPackage]:
- frequencyMHz = self.getWorkloadFreq(self.workloadEffectiveFreq, self.currentWorkload, cpu)
- if not frequencyMHz:
- self.logWorkloadError("Error: could not determine the measured frequency for cpu %s under workload %s" % (cpu, self.currentWorkload))
+ freqTable = self.workloadEffectiveFreq
+ else: # use /sys values
+ freqTable = self.workloadFreq
+
+ for cpu in self.packageToCpus[self.currentPackage]:
+ frequencyMHz = self.getWorkloadFreq(freqTable, self.currentWorkload, cpu)
+ if not frequencyMHz:
+ self.logWorkloadError("Error: could not determine the measured frequency for cpu %s under workload %s" % (cpu, self.currentWorkload))
+ success = False
+ continue
+ frequency = frequencyMHz*1000 # KHz
+ if unlimitedMaximum:
+ if not self.checkFrequencyGreaterThan(frequency, requiredFrequency):
+ self.logWorkloadError("Error: cpu%s in package %s has a measured frequency of %u MHz vs. a requirement of %u MHz (- %u MHz tolerance)"
+ % (cpu, self.currentPackage, int(frequency)/1000, int(requiredFrequency)/1000, self.frequencyTolerance))
success = False
- continue
- frequency = frequencyMHz*1000 # KHz
- if unlimitedMaximum:
- if not self.checkFrequencyGreaterThan(frequency, requiredFrequency):
- self.logWorkloadError("Error: cpu%s in package %s has a measured frequency of %u MHz vs. a requirement of %u MHz (- %u MHz tolerance)"
- % (cpu, self.currentPackage, int(frequency)/1000, int(requiredFrequency)/1000, self.frequencyTolerance))
- success = False
- else:
- if not self.checkFrequency(requiredFrequency, frequency):
- self.logWorkloadError("Error: cpu%s in package %s has a measured frequency of %u MHz vs. a requirement of %u MHz +- %u MHz"
- % (cpu, self.currentPackage, int(frequency)/1000, int(requiredFrequency)/1000, self.frequencyTolerance))
- success = False
+ else:
+ if not self.checkFrequency(requiredFrequency, frequency):
+ self.logWorkloadError("Error: cpu%s in package %s has a measured frequency of %u MHz vs. a requirement of %u MHz +- %u MHz"
+ % (cpu, self.currentPackage, int(frequency)/1000, int(requiredFrequency)/1000, self.frequencyTolerance))
+ success = False
+
return success
def runUserSpaceTests(self):
@@ -688,7 +681,7 @@
# 7. Set the the cpu speed to it's lowest value
frequency = self.frequencies[0]
- currentFrequency = self.getFrequency(ignoreErrors=True)
+ currentFrequency = self.getFrequency()
if currentFrequency:
print "Changing cpu frequency from %u to %u MHz" % (int(currentFrequency)/1000, (frequency/1000))
else:
@@ -699,16 +692,11 @@
sys.stdout.flush()
# 8. Verify the speed is set to the lowest value by comparing ~/scaling_min_freq to ~/scaling_cur_freq
- # This is an error if EFI is not supported, a warning otherwise
+ # if not, it's a warning - the frequency will be checked again after running the load.
currentFrequency = self.getFrequency()
minimumFrequency = self.getPackageParameter("scaling_min_freq")
if not minimumFrequency or not currentFrequency or not self.checkFrequency(minimumFrequency, currentFrequency):
- message = "Could not verify that cpu frequency is set to the minimum value of %s" % minimumFrequency
- if self.effectiveFrequencySupport:
- print "Warning: %s" % message
- else:
- self.logWorkloadError("Error: %s" % message)
- success = False
+ print "Warning: Could not verify that cpu frequency is set to the minimum value of %s" % minimumFrequency
# 9. Run and time non-cacheable work(?) test for each CPU
# 10. Repeat and time until execution times are within self.retryTolerance of each other
@@ -718,13 +706,13 @@
return False
print "Minumum frequency average load test time: %.2f" % self.minimumFrequencyTestTime
- # 10.5 if EFI is supported, check the measured EFI freq is near the minimum freq
- if not self.checkEffectiveFrequency(minimumFrequency):
+ # 10.5 check that measured frequency is near minimum
+ if not self.checkFrequencyResults(minimumFrequency):
success = False
# 11. Set the cpu speed to it's highest value as above.
frequency = self.frequencies[-1]
- currentFrequency = self.getFrequency(ignoreErrors=True)
+ currentFrequency = self.getFrequency()
print "Changing cpu frequency from %u to %u MHz" % (int(currentFrequency)/1000, (frequency/1000))
if not self.setFrequency("%u" % frequency):
success = False
@@ -740,12 +728,7 @@
return False
if not maximumFrequency or not currentFrequency or not self.checkFrequency(maximumFrequency, currentFrequency):
- message = "Could not verify that cpu frequency is set to the maximum value of %s" % maximumFrequency
- if self.effectiveFrequencySupport:
- print ("Warning: %s" % message)
- else:
- self.logWorkloadError("Error: %s" % message)
- success = False
+ print "Warning: Could not verify that cpu frequency is set to the maximum value of %s" % maximumFrequency
# 12. Repeat workload test, record timing
self.maximumFrequencyTestTime = self.runLoadTest()
@@ -753,8 +736,8 @@
return False
print "Maximum frequency average load test time: %.2f" % self.maximumFrequencyTestTime
- # 12.5 under EFI, check the max measured freqency is >= stated max
- if not self.checkEffectiveFrequency(maximumFrequency, unlimitedMaximum=True):
+ # 12.5 check the measured max measured freqency is >= stated max
+ if not self.checkFrequencyResults(maximumFrequency, unlimitedMaximum=True):
success = False
# 13. Verify MHz increase is comparable to time % decrease( eg. slow MHz/fast MHz ~= fast time/slow time;
@@ -840,22 +823,10 @@
# 21. Verify the current speed is the same as scaling_max_freq
maximumFrequency = self.getPackageParameter("scaling_max_freq")
currentFrequency = self.getFrequency()
- if not maximumFrequency or not currentFrequency:
- message = "could not verify current frequency."
- if self.effectiveFrequencySupport:
- print "Warning: %s" % message
- else:
- self.logWorkloadError("Error: %s" % message)
- sucess = False
-
- elif not self.checkFrequency(maximumFrequency, currentFrequency):
- message = "Current cpu frequency of %s is not set to the maximum value of %s" % (currentFrequency, maximumFrequency)
- if self.effectiveFrequencySupport:
- print "Warning: %s" % message
- else:
- self.logWorkloadError("Error: %s " % message)
- success = False
+ if not maximumFrequency or not currentFrequency or not self.checkFrequency(maximumFrequency, currentFrequency):
+ print "Warning: Current cpu frequency of %s is not set to the maximum value of %s" % (currentFrequency, maximumFrequency)
+
# 22. Repeat workload test, record timing, also verify frequency does not drop during run
self.performanceTestTime = self.runLoadTest()
if not self.performanceTestTime:
@@ -864,7 +835,7 @@
print "Performance load test time: %.2f" % self.performanceTestTime
# 22.5 check EFI freq vs. max
- if not self.checkEffectiveFrequency(maximumFrequency, unlimitedMaximum=True):
+ if not self.checkFrequencyResults(maximumFrequency, unlimitedMaximum=True):
success = False
# 23. Compare the timing to the max results for a self.speedUpTolerance delta
@@ -1036,15 +1007,6 @@
print ""
print ""
print "\n"
-
- def __printBorder(self, package, cell):
- sys.stdout.write("-------------") # 13 for row title
- cellBorder = " "
- for i in range(cell):
- cellBorder = cellBorder + "-"
- for cpu in self.packageToCpus[package]:
- sys.stdout.write(cellBorder) # 15 for cpu cell ( 1 space, 14 -)
- sys.stdout.write("\n")
def run(self):
PASSED = 0
12 years, 7 months
r1101 - trunk
by gnichols@fedoraproject.org
Author: gnichols
Date: 2011-09-23 14:45:44 +0000 (Fri, 23 Sep 2011)
New Revision: 1101
Modified:
trunk/Makefile
Log:
R30
Modified: trunk/Makefile
===================================================================
--- trunk/Makefile 2011-09-22 19:27:10 UTC (rev 1100)
+++ trunk/Makefile 2011-09-23 14:45:44 UTC (rev 1101)
@@ -14,7 +14,7 @@
# Author: Greg Nichols
V7_VERSION := 1.4
-V7_RELEASE := 29
+V7_RELEASE := 30
V7_VERSION_RELEASE := $(V7_VERSION)-$(V7_RELEASE)
V7_VERSION_PY := v7/version.py
V7_SVN_MODULE := svn+ssh://svn.fedorahosted.org/svn/v7
12 years, 7 months
r1100 - tags
by gnichols@fedoraproject.org
Author: gnichols
Date: 2011-09-22 19:27:10 +0000 (Thu, 22 Sep 2011)
New Revision: 1100
Added:
tags/v7-V1-4R29/
Log:
tag version
12 years, 7 months
r1099 - trunk
by gnichols@fedoraproject.org
Author: gnichols
Date: 2011-09-22 19:26:44 +0000 (Thu, 22 Sep 2011)
New Revision: 1099
Modified:
trunk/Makefile
trunk/v7.spec.in
Log:
R29
Modified: trunk/Makefile
===================================================================
--- trunk/Makefile 2011-09-22 19:25:53 UTC (rev 1098)
+++ trunk/Makefile 2011-09-22 19:26:44 UTC (rev 1099)
@@ -14,7 +14,7 @@
# Author: Greg Nichols
V7_VERSION := 1.4
-V7_RELEASE := 28
+V7_RELEASE := 29
V7_VERSION_RELEASE := $(V7_VERSION)-$(V7_RELEASE)
V7_VERSION_PY := v7/version.py
V7_SVN_MODULE := svn+ssh://svn.fedorahosted.org/svn/v7
Modified: trunk/v7.spec.in
===================================================================
--- trunk/v7.spec.in 2011-09-22 19:25:53 UTC (rev 1098)
+++ trunk/v7.spec.in 2011-09-22 19:26:44 UTC (rev 1099)
@@ -79,7 +79,7 @@
%changelog
* Wed Sep 21 2011 Greg Nichols <gnichols(a)redhat.com>
-V7 1.4 R28
+V7 1.4 R29
732113 - cpuscaling rewrite
12 years, 7 months
r1098 - trunk/tests/cpuscaling
by gnichols@fedoraproject.org
Author: gnichols
Date: 2011-09-22 19:25:53 +0000 (Thu, 22 Sep 2011)
New Revision: 1098
Modified:
trunk/tests/cpuscaling/cpuscaling.py
Log:
732113 - cpuscaling rewrite
Modified: trunk/tests/cpuscaling/cpuscaling.py
===================================================================
--- trunk/tests/cpuscaling/cpuscaling.py 2011-09-22 17:06:47 UTC (rev 1097)
+++ trunk/tests/cpuscaling/cpuscaling.py 2011-09-22 19:25:53 UTC (rev 1098)
@@ -180,6 +180,7 @@
# if no maximumLimit, downgrade to warn
if not maximumLimit:
warn = True
+ tag = "Warning:"
message = "%s measured speedup %.2f greater than the maximum speedup of %.2f" % (tag, speedup, self.maximumRequiredSpeedup())
if message:
@@ -187,7 +188,7 @@
print message
else:
self.logWorkloadError(message)
- return False
+ return False
return True
12 years, 7 months
r1097 - tags
by gnichols@fedoraproject.org
Author: gnichols
Date: 2011-09-22 17:06:47 +0000 (Thu, 22 Sep 2011)
New Revision: 1097
Added:
tags/v7-V1-4R28/
Log:
tag version
12 years, 7 months
r1096 - trunk
by gnichols@fedoraproject.org
Author: gnichols
Date: 2011-09-22 17:06:13 +0000 (Thu, 22 Sep 2011)
New Revision: 1096
Modified:
trunk/Makefile
trunk/v7.spec.in
Log:
R28
Modified: trunk/Makefile
===================================================================
--- trunk/Makefile 2011-09-22 17:05:25 UTC (rev 1095)
+++ trunk/Makefile 2011-09-22 17:06:13 UTC (rev 1096)
@@ -14,7 +14,7 @@
# Author: Greg Nichols
V7_VERSION := 1.4
-V7_RELEASE := 27
+V7_RELEASE := 28
V7_VERSION_RELEASE := $(V7_VERSION)-$(V7_RELEASE)
V7_VERSION_PY := v7/version.py
V7_SVN_MODULE := svn+ssh://svn.fedorahosted.org/svn/v7
Modified: trunk/v7.spec.in
===================================================================
--- trunk/v7.spec.in 2011-09-22 17:05:25 UTC (rev 1095)
+++ trunk/v7.spec.in 2011-09-22 17:06:13 UTC (rev 1096)
@@ -79,7 +79,7 @@
%changelog
* Wed Sep 21 2011 Greg Nichols <gnichols(a)redhat.com>
-V7 1.4 R27
+V7 1.4 R28
732113 - cpuscaling rewrite
12 years, 7 months
r1095 - trunk/tests/cpuscaling
by gnichols@fedoraproject.org
Author: gnichols
Date: 2011-09-22 17:05:25 +0000 (Thu, 22 Sep 2011)
New Revision: 1095
Modified:
trunk/tests/cpuscaling/cpuscaling.py
Log:
732113 - cpuscaling rewrite
Modified: trunk/tests/cpuscaling/cpuscaling.py
===================================================================
--- trunk/tests/cpuscaling/cpuscaling.py 2011-09-22 16:23:09 UTC (rev 1094)
+++ trunk/tests/cpuscaling/cpuscaling.py 2011-09-22 17:05:25 UTC (rev 1095)
@@ -914,7 +914,7 @@
return False
print "Single CPU On Demand Speedup: %.1f" % ondemandSpeedup
- if not self.checkSpeedup(ondemandSpeedup, warn=False, maximumLimit=Fase):
+ if not self.checkSpeedup(ondemandSpeedup, warn=False, maximumLimit=False):
success = False
else:
12 years, 7 months