r1084 - trunk
by gnichols@fedoraproject.org
Author: gnichols
Date: 2011-09-20 19:41:39 +0000 (Tue, 20 Sep 2011)
New Revision: 1084
Modified:
trunk/Makefile
Log:
R25
Modified: trunk/Makefile
===================================================================
--- trunk/Makefile 2011-09-20 16:09:39 UTC (rev 1083)
+++ trunk/Makefile 2011-09-20 19:41:39 UTC (rev 1084)
@@ -14,7 +14,7 @@
# Author: Greg Nichols
V7_VERSION := 1.4
-V7_RELEASE := 24
+V7_RELEASE := 25
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
r1083 - tags
by gnichols@fedoraproject.org
Author: gnichols
Date: 2011-09-20 16:09:39 +0000 (Tue, 20 Sep 2011)
New Revision: 1083
Added:
tags/v7-V1-4R24/
Log:
tag version
12 years, 7 months
r1082 - trunk/tests/cpuscaling
by gnichols@fedoraproject.org
Author: gnichols
Date: 2011-09-20 16:09:06 +0000 (Tue, 20 Sep 2011)
New Revision: 1082
Added:
trunk/tests/cpuscaling/aperf.c
Modified:
trunk/tests/cpuscaling/Makefile
trunk/tests/cpuscaling/cpuscaling.py
Log:
732113 - cpuscaling rewrite
Modified: trunk/tests/cpuscaling/Makefile
===================================================================
--- trunk/tests/cpuscaling/Makefile 2011-09-20 16:07:48 UTC (rev 1081)
+++ trunk/tests/cpuscaling/Makefile 2011-09-20 16:09:06 UTC (rev 1082)
@@ -15,8 +15,10 @@
.PHONY: all install download clean
-FILES=runtest.sh cpuscaling.py aperfmperf.py
+FILES=runtest.sh cpuscaling.py aperfmperf.py aperf.c
+BUILT_FILES=aperf
+
run: $(FILES) build
./runtest.sh
@@ -25,6 +27,9 @@
clean:
rm -f $(BUILT_FILES)
+
+aperf: aperf.c
+ gcc -o aperf aperf.c -lm
# Include Common Makefile
include $(DESTDIR)/usr/share/v7/lib/v7-make.include
Added: trunk/tests/cpuscaling/aperf.c
===================================================================
--- trunk/tests/cpuscaling/aperf.c (rev 0)
+++ trunk/tests/cpuscaling/aperf.c 2011-09-20 16:09:06 UTC (rev 1082)
@@ -0,0 +1,82 @@
+#define _GNU_SOURCE
+#include <math.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <sys/timeb.h>
+#include <sched.h>
+#include <errno.h>
+
+void usage(char *name) {
+ printf ("Usage: %s cpunum\n", name);
+}
+
+int main(int argc, char **argv) {
+ int i, cpu, fd;
+ char msr_file_name[64];
+ long long tsc, old_tsc, new_tsc;
+ long long aperf, old_aperf, new_aperf;
+ long long mperf, old_mperf, new_mperf;
+ struct timeb before, after;
+ long long int start, finish, total;
+ double freq;
+ cpu_set_t cpuset;
+
+ if (argc != 2) {
+ usage(argv[0]);
+ return 1;
+ }
+
+ errno = 0;
+ cpu = strtol(argv[1], (char **) NULL, 10);
+
+ if (errno) {
+ usage(argv[0]);
+ return 1;
+ }
+
+ sprintf(msr_file_name, "/dev/cpu/%d/msr", cpu);
+ fd = open(msr_file_name, O_RDONLY);
+
+ if (fd == -1) {
+ perror("Failed to open");
+ return 1;
+ }
+
+ CPU_ZERO(&cpuset);
+ CPU_SET(cpu, &cpuset);
+
+ if (sched_setaffinity(0, sizeof(cpu_set_t), &cpuset)) {
+ perror("Failed to set cpu affinity");
+ return 1;
+ }
+
+ ftime(&before);
+ pread(fd, &old_tsc, sizeof(old_tsc), 0x10);
+ pread(fd, &old_aperf, sizeof(old_mperf), 0xe7);
+ pread(fd, &old_mperf, sizeof(old_aperf), 0xe8);
+
+ for (i=0; i<0x8fffffff; i++) {
+ sqrt(i);
+ }
+
+ ftime(&after);
+ pread(fd, &new_tsc, sizeof(new_tsc), 0x10);
+ pread(fd, &new_aperf, sizeof(new_mperf), 0xe7);
+ pread(fd, &new_mperf, sizeof(new_aperf), 0xe8);
+
+ tsc = new_tsc-old_tsc;
+ aperf = new_aperf-old_aperf;
+ mperf = new_mperf-old_mperf;
+
+ start = before.time*1000 + before.millitm;
+ finish = after.time*1000 + after.millitm;
+ total = finish - start;
+
+ printf("runTime: %4.2f\n", 1.0*total/1000);
+ printf("freq: %7.0f\n", tsc / (1.0*aperf / (1.0 * mperf)) / total);
+ return 0;
+}
Modified: trunk/tests/cpuscaling/cpuscaling.py
===================================================================
--- trunk/tests/cpuscaling/cpuscaling.py 2011-09-20 16:07:48 UTC (rev 1081)
+++ trunk/tests/cpuscaling/cpuscaling.py 2011-09-20 16:09:06 UTC (rev 1082)
@@ -440,12 +440,12 @@
# if cpu is set, just load that one
if singleCpu:
- loadProcess = LoadProcess(self, singleCpu)
+ loadProcess = LoadProcess(self, singleCpu, aperfmperfSupport=self.effectiveFrequencySupport)
loadProcess.start()
self.loadProcesses[singleCpu] = loadProcess
else: # load all cpus in the package
for cpu in self.packageToCpus[self.currentPackage]:
- loadProcess = LoadProcess(self, cpu)
+ loadProcess = LoadProcess(self, cpu, aperfmperfSupport=self.effectiveFrequencySupport)
loadProcess.start()
self.loadProcesses[cpu] = loadProcess
@@ -513,6 +513,8 @@
print "System Capabilites:"
print "-------------------------------------------------"
+ self.logCPUInfo()
+
# 1. Determine if the cpu's support scaling using presense or lack there of ~/cpufreq in sysfs
if not self.getCPUFreqDirectories():
@@ -618,6 +620,26 @@
print "Warning: could not read CPU flags"
print exception
+ def logCPUInfo(self):
+ try:
+ cpuinfo = Command("cat /proc/cpuinfo")
+ cpuinfo.run()
+ model = None
+ cpu = None
+ for line in cpuinfo.output:
+ if line.startswith("processor"):
+ cpu = line.split(":")[1]
+ if line.startswith("model name"):
+ thisModel = line.split(":")[1]
+ if model != thisModel:
+ print "CPU %s Model: %s" % (cpu, thisModel)
+ model = thisModel
+ except Exception, exception:
+ print "Warning: could not read CPU Info"
+ print exception
+
+ return True
+
def turboBoostSupported(self):
return self.turboBoostSupport
@@ -1054,7 +1076,7 @@
return result
class LoadProcess:
- def __init__(self, owner, cpu):
+ def __init__(self, owner, cpu, aperfmperfSupport):
self.owner = owner
self.cpu = cpu
self.workProcess = None
@@ -1062,12 +1084,17 @@
self.start_elapsed_time = None
self.runTime = None
self.effectiveFrequency = None
+ self.aperfmperfSupport = aperfmperfSupport
# signal.signal(signal.SIGCHLD, self.sigChldHandler)
+ self.command = "./cpuscaling.py work " # Use the Effective Frequency Interface and pi() calculation for a load process
+ if self.aperfmperfSupport:
+ self.command = "./aperf " # Use aperf.c, which uses TSC/aperf/mperf and a square root calculation from libm
def start(self):
try:
print "starting process for cpu %s" % self.cpu
- self.workProcess = Command("./cpuscaling.py work %s" % self.cpu)
+ self.workProcess = Command("%s %s" % (self.command, self.cpu))
+ print "using work process: %s" % self.workProcess.command
self.workProcess.start()
taskset = Command("taskset -pc %s %s" % (self.cpu, self.workProcess.getPID()))
if self.owner.debug != Constants.off:
@@ -1102,7 +1129,7 @@
try:
if line.startswith("runTime: "):
self.runTime = float(line.split()[1])
- elif line.startswith("eftFreq: "):
+ elif line.startswith("freq: "):
self.effectiveFrequency = int(line.split()[1])
except (ValueError, IndexError):
pass # keep trying
@@ -1131,6 +1158,7 @@
if __name__ == "__main__":
+ # this load process uses the Effective Frequency Interface (see aperfmperf.py)
if "work" in sys.argv:
effectiveFrequencyInterface = None
effectiveFrequency = 0
@@ -1145,7 +1173,7 @@
if effectiveFrequencyInterface:
effectiveFrequency = effectiveFrequencyInterface.stop_sampling()
if effectiveFrequency > 0:
- print "eftFreq: %s" % effectiveFrequency
+ print "freq: %s" % effectiveFrequency
runTime = stop_elapsed_time - start_elapsed_time
print "runTime: %s" % (runTime, )
sys.stdout.flush()
12 years, 7 months
r1081 - trunk
by gnichols@fedoraproject.org
Author: gnichols
Date: 2011-09-20 16:07:48 +0000 (Tue, 20 Sep 2011)
New Revision: 1081
Modified:
trunk/v7.spec.in
Log:
changelog
Modified: trunk/v7.spec.in
===================================================================
--- trunk/v7.spec.in 2011-09-20 16:07:23 UTC (rev 1080)
+++ trunk/v7.spec.in 2011-09-20 16:07:48 UTC (rev 1081)
@@ -77,6 +77,11 @@
%changelog
+* Tue Sep 20 2011 Greg Nichols <gnichols(a)redhat.com>
+
+V7 1.4 R24
+ 732113 - cpuscaling rewrite
+
* Fri Sep 16 2011 Greg Nichols <gnichols(a)redhat.com>
V7 1.4 R23
@@ -91,7 +96,6 @@
V7 1.4 R22
- 732113 - cpuscaling rewrite
737651 - Traceback in v7 cpuscaling test (TypeError: float argument required, not str)
* Mon Aug 22 2011 Greg Nichols <gnichols(a)redhat.com>
12 years, 7 months
r1080 - trunk
by gnichols@fedoraproject.org
Author: gnichols
Date: 2011-09-20 16:07:23 +0000 (Tue, 20 Sep 2011)
New Revision: 1080
Modified:
trunk/Makefile
Log:
R24
Modified: trunk/Makefile
===================================================================
--- trunk/Makefile 2011-09-19 13:25:09 UTC (rev 1079)
+++ trunk/Makefile 2011-09-20 16:07:23 UTC (rev 1080)
@@ -14,7 +14,7 @@
# Author: Greg Nichols
V7_VERSION := 1.4
-V7_RELEASE := 23
+V7_RELEASE := 24
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
r1079 - tags
by gnichols@fedoraproject.org
Author: gnichols
Date: 2011-09-19 13:25:09 +0000 (Mon, 19 Sep 2011)
New Revision: 1079
Added:
tags/v7-V1-4R23/
Log:
tag version
12 years, 7 months
r1078 - trunk/v7
by gnichols@fedoraproject.org
Author: gnichols
Date: 2011-09-19 13:24:37 +0000 (Mon, 19 Sep 2011)
New Revision: 1078
Modified:
trunk/v7/hardwaretest.py
Log:
725441 - FEAT: save command should store results on server for review
Modified: trunk/v7/hardwaretest.py
===================================================================
--- trunk/v7/hardwaretest.py 2011-09-19 13:23:46 UTC (rev 1077)
+++ trunk/v7/hardwaretest.py 2011-09-19 13:24:37 UTC (rev 1078)
@@ -985,6 +985,8 @@
# otherwise, check the certification's test server
if not self.testServer:
self.testServer = self.certification.getTestServer()
+ if self.testServer == "unknown":
+ self.testServer = None
if self.testServer and (self.options.mode == Constants.auto or self.ui.promptConfirm("Copy results to test server %s?" % self.testServer)):
request = V7Http(self.testServer, "/v7/cgi/saveFile.py")
12 years, 7 months
r1077 - trunk/tests/cpuscaling
by gnichols@fedoraproject.org
Author: gnichols
Date: 2011-09-19 13:23:46 +0000 (Mon, 19 Sep 2011)
New Revision: 1077
Modified:
trunk/tests/cpuscaling/cpuscaling.py
Log:
732113 - cpuscaling rewrite
Modified: trunk/tests/cpuscaling/cpuscaling.py
===================================================================
--- trunk/tests/cpuscaling/cpuscaling.py 2011-09-19 13:22:56 UTC (rev 1076)
+++ trunk/tests/cpuscaling/cpuscaling.py 2011-09-19 13:23:46 UTC (rev 1077)
@@ -815,11 +815,14 @@
maximumFrequency = self.getPackageParameter("scaling_max_freq")
currentFrequency = self.getFrequency()
if not maximumFrequency or not currentFrequency:
- self.logWorkloadError("Error: could not determine current frequency")
- return False
-
- # otherwise
- if not self.checkFrequency(maximumFrequency, 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
@@ -891,7 +894,7 @@
else:
# some older systems don't support ondemand at all.
- self.logWorkloadError("Warning: %s governor not supported" % governor)
+ print "Warning: %s governor not supported" % governor
success = True
return success
12 years, 7 months
r1076 - trunk
by gnichols@fedoraproject.org
Author: gnichols
Date: 2011-09-19 13:22:56 +0000 (Mon, 19 Sep 2011)
New Revision: 1076
Modified:
trunk/v7.spec.in
Log:
changelog
Modified: trunk/v7.spec.in
===================================================================
--- trunk/v7.spec.in 2011-09-19 13:22:31 UTC (rev 1075)
+++ trunk/v7.spec.in 2011-09-19 13:22:56 UTC (rev 1076)
@@ -77,6 +77,16 @@
%changelog
+* Fri Sep 16 2011 Greg Nichols <gnichols(a)redhat.com>
+
+V7 1.4 R23
+
+ 737859 - bluray incur traceback: BluRayTest instance has no attribute 'mediaNames'
+ 736638 - v7 storage test won't work on 4K sector storage device
+ 736666 - v7 storage test has an improper write/read sequence
+ 736675 - v7 storage test sets an improper I/O records
+ 736679 - v7 storage test: improper dt options for raw I/O test
+
* Wed Aug 31 2011 Greg Nichols <gnichols(a)redhat.com>
V7 1.4 R22
12 years, 7 months
r1075 - trunk
by gnichols@fedoraproject.org
Author: gnichols
Date: 2011-09-19 13:22:31 +0000 (Mon, 19 Sep 2011)
New Revision: 1075
Modified:
trunk/Makefile
Log:
R23
Modified: trunk/Makefile
===================================================================
--- trunk/Makefile 2011-09-16 15:39:01 UTC (rev 1074)
+++ trunk/Makefile 2011-09-19 13:22:31 UTC (rev 1075)
@@ -14,7 +14,7 @@
# Author: Greg Nichols
V7_VERSION := 1.4
-V7_RELEASE := 22
+V7_RELEASE := 23
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