[libvirt] [RFC v4 PATCH 0/5] PowerPC : Extend libvirt to use PowerPC-KVM platform

Libvirt continues to be the key interface to configure and manage the KVM guest instances on x86. This patch set is an effort to enable libvirt to support KVM guest configuration and management on Power Book3S machines. Based on community discussion around the earlier version, this patch series augments the present 'kvm' driver to support PowerPC-KVM based guests. With the CPU driver for PowerPC already merged, this patch series adds on clean-ups, and some test cases as suggested. This series mostly focuses on cleanup and addition of testcases for base- powerpc patches. The patches for enabling spapr-vio based addressing would be sent out shortly, with the right domain schema additions. Series description: ------------------- Patch 1/5 : Use sysfs to decipher cpu topology information. Patch 2/5 : Modify the tests/nodeinfotest.c to use sysfs in addition to proc/cpuinfo. Patch 3/5 : Add support for ppc64 qemu Patch 4/5 : Clean up qemuBuildCommandLine to remove x86-specific assumptions. Patch 5/5 : Add ppc64 specific definitions to domain.rng Changelog: ---------- ** v1->v2 : * Patches 1,2,3 unchanged ; The hacks in Patch 4 of v1 replaced by a new patch to neatly select arch-specific features. ** v2->v3 : * Patches 1,2,3 have minor cleanups ; Patch 4 no longer has an arch-specific handler routine. It is now replaced by a much simpler patch that merely removes x86/pc-specific assumptions from libvirt. Patch 5 is a new addition from Michael Ellerman that adds a new device-tree based addressing mechanism for the 'pseries' guest. ** v3->v4 : * Patch 1 has minor cleanups, Patch 2 is a new addition that introduces test cases for patch 1. Patch 3,4 also have minor cleanups Patch 5 is a new addition, it contains ppc64 specific definitions to domain.rng -- Prerna Saxena Linux Technology Centre, IBM Systems and Technology Lab, Bangalore, India

From: Prerna Saxena <prerna@linux.vnet.ibm.com> Date: Mon, 3 Oct 2011 05:45:30 -0700 Subject: [PATCH 1/5] Use sysfs to gather host topology, in place of /proc/cpuinfo Libvirt at present depends on /proc/cpuinfo to gather host details such as CPUs, cores, threads, etc. This is an architecture- dependent approach. An alternative is to use 'Sysfs', which provides a platform-agnostic interface to parse host CPU topology. Signed-off-by: Prerna Saxena <prerna@linux.vnet.ibm.com> --- src/nodeinfo.c | 127 ++++++++++++++++++++++---------------------------------- 1 files changed, 50 insertions(+), 77 deletions(-) diff --git a/src/nodeinfo.c b/src/nodeinfo.c index 6448b79..3b2ecd1 100644 --- a/src/nodeinfo.c +++ b/src/nodeinfo.c @@ -30,6 +30,7 @@ #include <errno.h> #include <dirent.h> #include <sys/utsname.h> +#include <sched.h> #if HAVE_NUMACTL # define NUMA_VERSION1_COMPATIBILITY 1 @@ -67,8 +68,8 @@ /* NB, this is not static as we need to call it from the testsuite */ int linuxNodeInfoCPUPopulate(FILE *cpuinfo, - virNodeInfoPtr nodeinfo, - bool need_hyperthreads); + char *sysfs_cpudir, + virNodeInfoPtr nodeinfo); static int linuxNodeGetCPUStats(FILE *procstat, int cpuNum, @@ -191,23 +192,27 @@ static int parse_socket(unsigned int cpu) return ret; } +static int parse_core(unsigned int cpu) +{ + return get_cpu_value(cpu, "topology/core_id", false); +} + int linuxNodeInfoCPUPopulate(FILE *cpuinfo, - virNodeInfoPtr nodeinfo, - bool need_hyperthreads) + char *sysfs_cpudir, + virNodeInfoPtr nodeinfo) { char line[1024]; DIR *cpudir = NULL; struct dirent *cpudirent = NULL; unsigned int cpu; - unsigned long cur_threads; - int socket; - unsigned long long socket_mask = 0; - unsigned int remaining; + unsigned long core, socket, cur_threads; + cpu_set_t core_mask; + cpu_set_t socket_mask; int online; nodeinfo->cpus = 0; nodeinfo->mhz = 0; - nodeinfo->cores = 1; + nodeinfo->cores = 0; nodeinfo->nodes = 1; # if HAVE_NUMACTL @@ -221,20 +226,10 @@ int linuxNodeInfoCPUPopulate(FILE *cpuinfo, /* NOTE: hyperthreads are ignored here; they are parsed out of /sys */ while (fgets(line, sizeof(line), cpuinfo) != NULL) { char *buf = line; - if (STRPREFIX(buf, "processor")) { /* aka a single logical CPU */ - buf += 9; - while (*buf && c_isspace(*buf)) - buf++; - if (*buf != ':') { - nodeReportError(VIR_ERR_INTERNAL_ERROR, - "%s", _("parsing cpuinfo processor")); - return -1; - } - nodeinfo->cpus++; # if defined(__x86_64__) || \ defined(__amd64__) || \ defined(__i386__) - } else if (STRPREFIX(buf, "cpu MHz")) { + if (STRPREFIX(buf, "cpu MHz")) { char *p; unsigned int ui; buf += 9; @@ -249,24 +244,9 @@ int linuxNodeInfoCPUPopulate(FILE *cpuinfo, /* Accept trailing fractional part. */ && (*p == '\0' || *p == '.' || c_isspace(*p))) nodeinfo->mhz = ui; - } else if (STRPREFIX(buf, "cpu cores")) { /* aka cores */ - char *p; - unsigned int id; - buf += 9; - while (*buf && c_isspace(*buf)) - buf++; - if (*buf != ':' || !buf[1]) { - nodeReportError(VIR_ERR_INTERNAL_ERROR, - _("parsing cpuinfo cpu cores %c"), *buf); - return -1; - } - if (virStrToLong_ui(buf+1, &p, 10, &id) == 0 - && (*p == '\0' || c_isspace(*p)) - && id > nodeinfo->cores) - nodeinfo->cores = id; # elif defined(__powerpc__) || \ defined(__powerpc64__) - } else if (STRPREFIX(buf, "clock")) { + if (STRPREFIX(buf, "clock")) { char *p; unsigned int ui; buf += 5; @@ -281,53 +261,30 @@ int linuxNodeInfoCPUPopulate(FILE *cpuinfo, /* Accept trailing fractional part. */ && (*p == '\0' || *p == '.' || c_isspace(*p))) nodeinfo->mhz = ui; -# elif defined(__s390__) || \ - defined(__s390x__) - } else if (STRPREFIX(buf, "# processors")) { - char *p; - unsigned int ui; - buf += 12; - while (*buf && c_isspace(*buf)) - buf++; - if (*buf != ':' || !buf[1]) { - nodeReportError(VIR_ERR_INTERNAL_ERROR, - _("parsing number of processors %c"), *buf); - return -1; - } - if (virStrToLong_ui(buf+1, &p, 10, &ui) == 0 - && (*p == '\0' || c_isspace(*p))) - nodeinfo->cpus = ui; /* No other interesting infos are available in /proc/cpuinfo. * However, there is a line identifying processor's version, * identification and machine, but we don't want it to be caught * and parsed in next iteration, because it is not in expected * format and thus lead to error. */ - break; # else # warning Parser for /proc/cpuinfo needs to be adapted for your architecture # endif } } - if (!nodeinfo->cpus) { - nodeReportError(VIR_ERR_INTERNAL_ERROR, - "%s", _("no cpus found")); - return -1; - } - - if (!need_hyperthreads) - return 0; - - /* OK, we've parsed what we can out of /proc/cpuinfo. Get the socket - * and thread information from /sys + /* OK, we've parsed clock speed out of /proc/cpuinfo. Get the core, socket + * thread and topology information from /sys */ - remaining = nodeinfo->cpus; - cpudir = opendir(CPU_SYS_PATH); + cpudir = opendir(sysfs_cpudir); if (cpudir == NULL) { - virReportSystemError(errno, _("cannot opendir %s"), CPU_SYS_PATH); + virReportSystemError(errno, _("cannot opendir %s"), sysfs_cpudir); return -1; } - while ((errno = 0), remaining && (cpudirent = readdir(cpudir))) { + + CPU_ZERO(&core_mask); + CPU_ZERO(&socket_mask); + + while ((cpudirent = readdir(cpudir))) { if (sscanf(cpudirent->d_name, "cpu%u", &cpu) != 1) continue; @@ -338,15 +295,19 @@ int linuxNodeInfoCPUPopulate(FILE *cpuinfo, } if (!online) continue; - remaining--; + nodeinfo->cpus++; - socket = parse_socket(cpu); - if (socket < 0) { - closedir(cpudir); - return -1; + /* Parse core */ + core = parse_core(cpu); + if (!CPU_ISSET(core, &core_mask)) { + CPU_SET(core, &core_mask); + nodeinfo->cores++; } - if (!(socket_mask & (1 << socket))) { - socket_mask |= (1 << socket); + + /* Parse socket */ + socket = parse_socket(cpu); + if (!CPU_ISSET(socket, &socket_mask)) { + CPU_SET(socket, &socket_mask); nodeinfo->sockets++; } @@ -367,7 +328,12 @@ int linuxNodeInfoCPUPopulate(FILE *cpuinfo, closedir(cpudir); - /* there should always be at least one socket and one thread */ + /* there should always be at least one cpu, socket and one thread */ + if (nodeinfo->cpus == 0) { + nodeReportError(VIR_ERR_INTERNAL_ERROR, + "%s", _("no CPUs found")); + return -1; + } if (nodeinfo->sockets == 0) { nodeReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("no sockets found")); @@ -611,13 +577,20 @@ int nodeGetInfo(virConnectPtr conn ATTRIBUTE_UNUSED, virNodeInfoPtr nodeinfo) { #ifdef __linux__ { int ret; + char *sysfs_cpuinfo; FILE *cpuinfo = fopen(CPUINFO_PATH, "r"); if (!cpuinfo) { virReportSystemError(errno, _("cannot open %s"), CPUINFO_PATH); return -1; } - ret = linuxNodeInfoCPUPopulate(cpuinfo, nodeinfo, true); + + if (virAsprintf(&sysfs_cpuinfo, CPU_SYS_PATH) < 0) { + virReportOOMError(); + return -1; + } + + ret = linuxNodeInfoCPUPopulate(cpuinfo, sysfs_cpuinfo, nodeinfo); VIR_FORCE_FCLOSE(cpuinfo); if (ret < 0) return -1; -- 1.7.3.4 -- Prerna Saxena Linux Technology Centre, IBM Systems and Technology Lab, Bangalore, India

On 12/01/2011 01:01 PM, Prerna Saxena wrote:
From: Prerna Saxena<prerna@linux.vnet.ibm.com> Date: Mon, 3 Oct 2011 05:45:30 -0700 Subject: [PATCH 1/5] Use sysfs to gather host topology, in place of /proc/cpuinfo
Libvirt at present depends on /proc/cpuinfo to gather host details such as CPUs, cores, threads, etc. This is an architecture- dependent approach. An alternative is to use 'Sysfs', which provides a platform-agnostic interface to parse host CPU topology.
Signed-off-by: Prerna Saxena<prerna@linux.vnet.ibm.com>
ACK

From: Prerna Saxena <prerna@linux.vnet.ibm.com> Date: Thu, 1 Dec 2011 12:47:52 +0530 Subject: [PATCH 2/5] Modify the tests/nodeinfotest.c to use sysfs in addition to proc/cpuinfo Signed-off-by: Prerna Saxena <prerna@linux.vnet.ibm.com> --- tests/nodeinfodata/linux-nodeinfo-1.cpuinfo | 45 --------- tests/nodeinfodata/linux-nodeinfo-1.meminfo | 28 ------ tests/nodeinfodata/linux-nodeinfo-1.txt | 1 - tests/nodeinfodata/linux-nodeinfo-2.cpuinfo | 47 --------- tests/nodeinfodata/linux-nodeinfo-2.meminfo | 28 ------ tests/nodeinfodata/linux-nodeinfo-2.txt | 1 - tests/nodeinfodata/linux-nodeinfo-3.cpuinfo | 99 -------------------- tests/nodeinfodata/linux-nodeinfo-3.meminfo | 28 ------ tests/nodeinfodata/linux-nodeinfo-3.txt | 1 - tests/nodeinfodata/linux-nodeinfo-4.cpuinfo | 95 ------------------- tests/nodeinfodata/linux-nodeinfo-4.meminfo | 28 ------ tests/nodeinfodata/linux-nodeinfo-4.txt | 1 - tests/nodeinfodata/linux-nodeinfo-5.cpuinfo | 95 ------------------- tests/nodeinfodata/linux-nodeinfo-5.meminfo | 28 ------ tests/nodeinfodata/linux-nodeinfo-5.txt | 1 - tests/nodeinfodata/linux-nodeinfo-6.cpuinfo | 95 ------------------- tests/nodeinfodata/linux-nodeinfo-6.meminfo | 28 ------ tests/nodeinfodata/linux-nodeinfo-6.txt | 1 - .../linux-nodeinfo-sysfs-test-1-cpu-output.txt | 1 + .../linux-nodeinfo-sysfs-test-1.cpuinfo | 45 +++++++++ .../linux-nodeinfo-sysfs-test-1/cpu/cpu0/online | 1 + .../cpu/cpu0/topology/core_id | 1 + .../cpu/cpu0/topology/core_siblings | 1 + .../cpu/cpu0/topology/core_siblings_list | 1 + .../cpu/cpu0/topology/physical_package_id | 1 + .../cpu/cpu0/topology/thread_siblings | 1 + .../cpu/cpu0/topology/thread_siblings_list | 1 + .../linux-nodeinfo-sysfs-test-1/cpu/cpu1/core_id | 1 + .../cpu/cpu1/core_siblings | 1 + .../cpu/cpu1/core_siblings_list | 1 + .../linux-nodeinfo-sysfs-test-1/cpu/cpu1/online | 1 + .../cpu/cpu1/physical_package_id | 1 + .../cpu/cpu1/thread_siblings | 1 + .../cpu/cpu1/thread_siblings_list | 1 + .../cpu/cpu1/topology/core_id | 1 + .../cpu/cpu1/topology/core_siblings | 1 + .../cpu/cpu1/topology/core_siblings_list | 1 + .../cpu/cpu1/topology/physical_package_id | 1 + .../cpu/cpu1/topology/thread_siblings | 1 + .../cpu/cpu1/topology/thread_siblings_list | 1 + .../linux-nodeinfo-sysfs-test-1/node/node0/meminfo | 28 ++++++ .../linux-nodeinfo-sysfs-test-1/node/node1/meminfo | 28 ++++++ tests/nodeinfotest.c | 26 +++--- 43 files changed, 136 insertions(+), 662 deletions(-) diff --git a/tests/nodeinfodata/linux-nodeinfo-1.cpuinfo b/tests/nodeinfodata/linux-nodeinfo-1.cpuinfo deleted file mode 100644 index e88a48f..0000000 --- a/tests/nodeinfodata/linux-nodeinfo-1.cpuinfo +++ /dev/null @@ -1,45 +0,0 @@ -processor : 0 -vendor_id : GenuineIntel -cpu family : 15 -model : 4 -model name : Intel(R) Xeon(TM) CPU 2.80GHz -stepping : 8 -cpu MHz : 2800.000 -cache size : 2048 KB -physical id : 0 -siblings : 2 -core id : 0 -cpu cores : 2 -fpu : yes -fpu_exception : yes -cpuid level : 5 -wp : yes -flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx lm constant_tsc pni monitor ds_cpl est cid cx16 xtpr lahf_lm -bogomips : 5590.67 -clflush size : 64 -cache_alignment : 128 -address sizes : 36 bits physical, 48 bits virtual -power management: - -processor : 1 -vendor_id : GenuineIntel -cpu family : 15 -model : 4 -model name : Intel(R) Xeon(TM) CPU 2.80GHz -stepping : 8 -cpu MHz : 2800.000 -cache size : 2048 KB -physical id : 0 -siblings : 2 -core id : 1 -cpu cores : 2 -fpu : yes -fpu_exception : yes -cpuid level : 5 -wp : yes -flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx lm constant_tsc pni monitor ds_cpl est cid cx16 xtpr lahf_lm -bogomips : 5586.49 -clflush size : 64 -cache_alignment : 128 -address sizes : 36 bits physical, 48 bits virtual -power management: diff --git a/tests/nodeinfodata/linux-nodeinfo-1.meminfo b/tests/nodeinfodata/linux-nodeinfo-1.meminfo deleted file mode 100644 index dd5565e..0000000 --- a/tests/nodeinfodata/linux-nodeinfo-1.meminfo +++ /dev/null @@ -1,28 +0,0 @@ -MemTotal: 2053960 kB -MemFree: 157792 kB -Buffers: 209440 kB -Cached: 660788 kB -SwapCached: 76 kB -Active: 1416036 kB -Inactive: 178872 kB -SwapTotal: 2064376 kB -SwapFree: 2063940 kB -Dirty: 1736 kB -Writeback: 0 kB -AnonPages: 723984 kB -Mapped: 105208 kB -Slab: 225000 kB -SReclaimable: 172568 kB -SUnreclaim: 52432 kB -PageTables: 40224 kB -NFS_Unstable: 0 kB -Bounce: 0 kB -CommitLimit: 3091356 kB -Committed_AS: 1270588 kB -VmallocTotal: 34359738367 kB -VmallocUsed: 30640 kB -VmallocChunk: 34359705907 kB -HugePages_Total: 0 -HugePages_Free: 0 -HugePages_Rsvd: 0 -Hugepagesize: 2048 kB diff --git a/tests/nodeinfodata/linux-nodeinfo-1.txt b/tests/nodeinfodata/linux-nodeinfo-1.txt deleted file mode 100644 index 09e2946..0000000 --- a/tests/nodeinfodata/linux-nodeinfo-1.txt +++ /dev/null @@ -1 +0,0 @@ -CPUs: 2, MHz: 2800, Nodes: 1, Cores: 2 diff --git a/tests/nodeinfodata/linux-nodeinfo-2.cpuinfo b/tests/nodeinfodata/linux-nodeinfo-2.cpuinfo deleted file mode 100644 index 95d96e1..0000000 --- a/tests/nodeinfodata/linux-nodeinfo-2.cpuinfo +++ /dev/null @@ -1,47 +0,0 @@ -processor : 0 -vendor_id : AuthenticAMD -cpu family : 15 -model : 75 -model name : AMD Athlon(tm) 64 X2 Dual Core Processor 4200+ -stepping : 2 -cpu MHz : 2211.364 -cache size : 512 KB -physical id : 0 -siblings : 2 -core id : 0 -cpu cores : 2 -fpu : yes -fpu_exception : yes -cpuid level : 1 -wp : yes -flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm 3dnowext 3dnow pni cx16 lahf_lm cmp_legacy svm extapic cr8_legacy -bogomips : 4424.80 -TLB size : 1024 4K pages -clflush size : 64 -cache_alignment : 64 -address sizes : 40 bits physical, 48 bits virtual -power management: ts fid vid ttp tm stc - -processor : 1 -vendor_id : AuthenticAMD -cpu family : 15 -model : 75 -model name : AMD Athlon(tm) 64 X2 Dual Core Processor 4200+ -stepping : 2 -cpu MHz : 2211.364 -cache size : 512 KB -physical id : 0 -siblings : 2 -core id : 1 -cpu cores : 2 -fpu : yes -fpu_exception : yes -cpuid level : 1 -wp : yes -flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm 3dnowext 3dnow pni cx16 lahf_lm cmp_legacy svm extapic cr8_legacy -bogomips : 4422.14 -TLB size : 1024 4K pages -clflush size : 64 -cache_alignment : 64 -address sizes : 40 bits physical, 48 bits virtual -power management: ts fid vid ttp tm stc diff --git a/tests/nodeinfodata/linux-nodeinfo-2.meminfo b/tests/nodeinfodata/linux-nodeinfo-2.meminfo deleted file mode 100644 index e1d9b86..0000000 --- a/tests/nodeinfodata/linux-nodeinfo-2.meminfo +++ /dev/null @@ -1,28 +0,0 @@ -MemTotal: 4059540 kB -MemFree: 3525008 kB -Buffers: 24480 kB -Cached: 282300 kB -SwapCached: 0 kB -Active: 230980 kB -Inactive: 243276 kB -SwapTotal: 2031608 kB -SwapFree: 2031608 kB -Dirty: 200 kB -Writeback: 0 kB -AnonPages: 167376 kB -Mapped: 31204 kB -Slab: 34904 kB -SReclaimable: 15544 kB -SUnreclaim: 19360 kB -PageTables: 7704 kB -NFS_Unstable: 0 kB -Bounce: 0 kB -CommitLimit: 4061376 kB -Committed_AS: 265176 kB -VmallocTotal: 34359738367 kB -VmallocUsed: 1736 kB -VmallocChunk: 34359736147 kB -HugePages_Total: 0 -HugePages_Free: 0 -HugePages_Rsvd: 0 -Hugepagesize: 2048 kB diff --git a/tests/nodeinfodata/linux-nodeinfo-2.txt b/tests/nodeinfodata/linux-nodeinfo-2.txt deleted file mode 100644 index e4eea94..0000000 --- a/tests/nodeinfodata/linux-nodeinfo-2.txt +++ /dev/null @@ -1 +0,0 @@ -CPUs: 2, MHz: 2211, Nodes: 1, Cores: 2 diff --git a/tests/nodeinfodata/linux-nodeinfo-3.cpuinfo b/tests/nodeinfodata/linux-nodeinfo-3.cpuinfo deleted file mode 100644 index 94e3c01..0000000 --- a/tests/nodeinfodata/linux-nodeinfo-3.cpuinfo +++ /dev/null @@ -1,99 +0,0 @@ -processor : 0 -vendor_id : GenuineIntel -cpu family : 6 -model : 15 -model name : Intel(R) Xeon(R) CPU 5110 @ 1.60GHz -stepping : 6 -cpu MHz : 1595.925 -cache size : 4096 KB -physical id : 0 -siblings : 2 -core id : 0 -cpu cores : 2 -fpu : yes -fpu_exception : yes -cpuid level : 10 -wp : yes -flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov -pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall lm constant_tsc -pni monitor ds_cpl vmx tm2 ssse3 cx16 xtpr dca lahf_lm -bogomips : 3193.88 -clflush size : 64 -cache_alignment : 64 -address sizes : 36 bits physical, 48 bits virtual -power management: - -processor : 1 -vendor_id : GenuineIntel -cpu family : 6 -model : 15 -model name : Intel(R) Xeon(R) CPU 5110 @ 1.60GHz -stepping : 6 -cpu MHz : 1595.925 -cache size : 4096 KB -physical id : 3 -siblings : 2 -core id : 0 -cpu cores : 2 -fpu : yes -fpu_exception : yes -cpuid level : 10 -wp : yes -flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov -pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall lm constant_tsc -pni monitor ds_cpl vmx tm2 ssse3 cx16 xtpr dca lahf_lm -bogomips : 3191.89 -clflush size : 64 -cache_alignment : 64 -address sizes : 36 bits physical, 48 bits virtual -power management: - -processor : 2 -vendor_id : GenuineIntel -cpu family : 6 -model : 15 -model name : Intel(R) Xeon(R) CPU 5110 @ 1.60GHz -stepping : 6 -cpu MHz : 1595.925 -cache size : 4096 KB -physical id : 0 -siblings : 2 -core id : 1 -cpu cores : 2 -fpu : yes -fpu_exception : yes -cpuid level : 10 -wp : yes -flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov -pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall lm constant_tsc -pni monitor ds_cpl vmx tm2 ssse3 cx16 xtpr dca lahf_lm -bogomips : 3191.88 -clflush size : 64 -cache_alignment : 64 -address sizes : 36 bits physical, 48 bits virtual -power management: - -processor : 3 -vendor_id : GenuineIntel -cpu family : 6 -model : 15 -model name : Intel(R) Xeon(R) CPU 5110 @ 1.60GHz -stepping : 6 -cpu MHz : 1595.925 -cache size : 4096 KB -physical id : 3 -siblings : 2 -core id : 1 -cpu cores : 2 -fpu : yes -fpu_exception : yes -cpuid level : 10 -wp : yes -flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov -pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall lm constant_tsc -pni monitor ds_cpl vmx tm2 ssse3 cx16 xtpr dca lahf_lm -bogomips : 3191.87 -clflush size : 64 -cache_alignment : 64 -address sizes : 36 bits physical, 48 bits virtual -power management: diff --git a/tests/nodeinfodata/linux-nodeinfo-3.meminfo b/tests/nodeinfodata/linux-nodeinfo-3.meminfo deleted file mode 100644 index 6bb8f64..0000000 --- a/tests/nodeinfodata/linux-nodeinfo-3.meminfo +++ /dev/null @@ -1,28 +0,0 @@ -MemTotal: 4059272 kB -MemFree: 3532828 kB -Buffers: 16644 kB -Cached: 286152 kB -SwapCached: 0 kB -Active: 252032 kB -Inactive: 220148 kB -SwapTotal: 2031608 kB -SwapFree: 2031608 kB -Dirty: 76 kB -Writeback: 0 kB -AnonPages: 169548 kB -Mapped: 25456 kB -Slab: 27260 kB -SReclaimable: 9512 kB -SUnreclaim: 17748 kB -PageTables: 7552 kB -NFS_Unstable: 0 kB -Bounce: 0 kB -CommitLimit: 4061244 kB -Committed_AS: 278572 kB -VmallocTotal: 34359738367 kB -VmallocUsed: 2044 kB -VmallocChunk: 34359736107 kB -HugePages_Total: 0 -HugePages_Free: 0 -HugePages_Rsvd: 0 -Hugepagesize: 2048 kB diff --git a/tests/nodeinfodata/linux-nodeinfo-3.txt b/tests/nodeinfodata/linux-nodeinfo-3.txt deleted file mode 100644 index 17d4d8e..0000000 --- a/tests/nodeinfodata/linux-nodeinfo-3.txt +++ /dev/null @@ -1 +0,0 @@ -CPUs: 4, MHz: 1595, Nodes: 1, Cores: 2 diff --git a/tests/nodeinfodata/linux-nodeinfo-4.cpuinfo b/tests/nodeinfodata/linux-nodeinfo-4.cpuinfo deleted file mode 100644 index 535a29d..0000000 --- a/tests/nodeinfodata/linux-nodeinfo-4.cpuinfo +++ /dev/null @@ -1,95 +0,0 @@ -processor : 0 -vendor_id : AuthenticAMD -cpu family : 16 -model : 2 -model name : AMD Processor model unknown -stepping : 0 -cpu MHz : 1000.000 -cache size : 512 KB -physical id : 0 -siblings : 4 -core id : 0 -cpu cores : 4 -fpu : yes -fpu_exception : yes -cpuid level : 5 -wp : yes -flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy altmovcr8 abm sse4a misalignsse 3dnowprefetch osvw -bogomips : 4131.46 -TLB size : 1024 4K pages -clflush size : 64 -cache_alignment : 64 -address sizes : 48 bits physical, 48 bits virtual -power management: ts ttp tm stc 100mhzsteps hwpstate [8] - -processor : 1 -vendor_id : AuthenticAMD -cpu family : 16 -model : 2 -model name : AMD Processor model unknown -stepping : 0 -cpu MHz : 1000.000 -cache size : 512 KB -physical id : 0 -siblings : 4 -core id : 1 -cpu cores : 4 -fpu : yes -fpu_exception : yes -cpuid level : 5 -wp : yes -flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy altmovcr8 abm sse4a misalignsse 3dnowprefetch osvw -bogomips : 3200.13 -TLB size : 1024 4K pages -clflush size : 64 -cache_alignment : 64 -address sizes : 48 bits physical, 48 bits virtual -power management: ts ttp tm stc 100mhzsteps hwpstate [8] - -processor : 2 -vendor_id : AuthenticAMD -cpu family : 16 -model : 2 -model name : AMD Processor model unknown -stepping : 0 -cpu MHz : 1000.000 -cache size : 512 KB -physical id : 0 -siblings : 4 -core id : 2 -cpu cores : 4 -fpu : yes -fpu_exception : yes -cpuid level : 5 -wp : yes -flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy altmovcr8 abm sse4a misalignsse 3dnowprefetch osvw -bogomips : 3200.14 -TLB size : 1024 4K pages -clflush size : 64 -cache_alignment : 64 -address sizes : 48 bits physical, 48 bits virtual -power management: ts ttp tm stc 100mhzsteps hwpstate [8] - -processor : 3 -vendor_id : AuthenticAMD -cpu family : 16 -model : 2 -model name : AMD Processor model unknown -stepping : 0 -cpu MHz : 1000.000 -cache size : 512 KB -physical id : 0 -siblings : 4 -core id : 3 -cpu cores : 4 -fpu : yes -fpu_exception : yes -cpuid level : 5 -wp : yes -flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy altmovcr8 abm sse4a misalignsse 3dnowprefetch osvw -bogomips : 3200.01 -TLB size : 1024 4K pages -clflush size : 64 -cache_alignment : 64 -address sizes : 48 bits physical, 48 bits virtual -power management: ts ttp tm stc 100mhzsteps hwpstate [8] diff --git a/tests/nodeinfodata/linux-nodeinfo-4.meminfo b/tests/nodeinfodata/linux-nodeinfo-4.meminfo deleted file mode 100644 index 6bb8f64..0000000 --- a/tests/nodeinfodata/linux-nodeinfo-4.meminfo +++ /dev/null @@ -1,28 +0,0 @@ -MemTotal: 4059272 kB -MemFree: 3532828 kB -Buffers: 16644 kB -Cached: 286152 kB -SwapCached: 0 kB -Active: 252032 kB -Inactive: 220148 kB -SwapTotal: 2031608 kB -SwapFree: 2031608 kB -Dirty: 76 kB -Writeback: 0 kB -AnonPages: 169548 kB -Mapped: 25456 kB -Slab: 27260 kB -SReclaimable: 9512 kB -SUnreclaim: 17748 kB -PageTables: 7552 kB -NFS_Unstable: 0 kB -Bounce: 0 kB -CommitLimit: 4061244 kB -Committed_AS: 278572 kB -VmallocTotal: 34359738367 kB -VmallocUsed: 2044 kB -VmallocChunk: 34359736107 kB -HugePages_Total: 0 -HugePages_Free: 0 -HugePages_Rsvd: 0 -Hugepagesize: 2048 kB diff --git a/tests/nodeinfodata/linux-nodeinfo-4.txt b/tests/nodeinfodata/linux-nodeinfo-4.txt deleted file mode 100644 index 5a5c919..0000000 --- a/tests/nodeinfodata/linux-nodeinfo-4.txt +++ /dev/null @@ -1 +0,0 @@ -CPUs: 4, MHz: 1000, Nodes: 1, Cores: 4 diff --git a/tests/nodeinfodata/linux-nodeinfo-5.cpuinfo b/tests/nodeinfodata/linux-nodeinfo-5.cpuinfo deleted file mode 100644 index 7cb6e18..0000000 --- a/tests/nodeinfodata/linux-nodeinfo-5.cpuinfo +++ /dev/null @@ -1,95 +0,0 @@ -processor : 0 -vendor_id : AuthenticAMD -cpu family : 15 -model : 65 -model name : Dual-Core AMD Opteron(tm) Processor 2220 -stepping : 3 -cpu MHz : 2814.921 -cache size : 1024 KB -physical id : 0 -siblings : 2 -core id : 0 -cpu cores : 2 -fpu : yes -fpu_exception : yes -cpuid level : 1 -wp : yes -flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm 3dnowext 3dnow pni cx16 lahf_lm cmp_legacy svm extapic cr8_legacy -bogomips : 5633.58 -TLB size : 1024 4K pages -clflush size : 64 -cache_alignment : 64 -address sizes : 40 bits physical, 48 bits virtual -power management: ts fid vid ttp tm stc - -processor : 1 -vendor_id : AuthenticAMD -cpu family : 15 -model : 65 -model name : Dual-Core AMD Opteron(tm) Processor 2220 -stepping : 3 -cpu MHz : 2814.921 -cache size : 1024 KB -physical id : 0 -siblings : 2 -core id : 1 -cpu cores : 2 -fpu : yes -fpu_exception : yes -cpuid level : 1 -wp : yes -flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm 3dnowext 3dnow pni cx16 lahf_lm cmp_legacy svm extapic cr8_legacy -bogomips : 5629.01 -TLB size : 1024 4K pages -clflush size : 64 -cache_alignment : 64 -address sizes : 40 bits physical, 48 bits virtual -power management: ts fid vid ttp tm stc - -processor : 2 -vendor_id : AuthenticAMD -cpu family : 15 -model : 65 -model name : Dual-Core AMD Opteron(tm) Processor 2220 -stepping : 3 -cpu MHz : 2814.921 -cache size : 1024 KB -physical id : 1 -siblings : 2 -core id : 0 -cpu cores : 2 -fpu : yes -fpu_exception : yes -cpuid level : 1 -wp : yes -flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm 3dnowext 3dnow pni cx16 lahf_lm cmp_legacy svm extapic cr8_legacy -bogomips : 5628.94 -TLB size : 1024 4K pages -clflush size : 64 -cache_alignment : 64 -address sizes : 40 bits physical, 48 bits virtual -power management: ts fid vid ttp tm stc - -processor : 3 -vendor_id : AuthenticAMD -cpu family : 15 -model : 65 -model name : Dual-Core AMD Opteron(tm) Processor 2220 -stepping : 3 -cpu MHz : 2814.921 -cache size : 1024 KB -physical id : 1 -siblings : 2 -core id : 1 -cpu cores : 2 -fpu : yes -fpu_exception : yes -cpuid level : 1 -wp : yes -flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm 3dnowext 3dnow pni cx16 lahf_lm cmp_legacy svm extapic cr8_legacy -bogomips : 5628.86 -TLB size : 1024 4K pages -clflush size : 64 -cache_alignment : 64 -address sizes : 40 bits physical, 48 bits virtual -power management: ts fid vid ttp tm stc diff --git a/tests/nodeinfodata/linux-nodeinfo-5.meminfo b/tests/nodeinfodata/linux-nodeinfo-5.meminfo deleted file mode 100644 index 6bb8f64..0000000 --- a/tests/nodeinfodata/linux-nodeinfo-5.meminfo +++ /dev/null @@ -1,28 +0,0 @@ -MemTotal: 4059272 kB -MemFree: 3532828 kB -Buffers: 16644 kB -Cached: 286152 kB -SwapCached: 0 kB -Active: 252032 kB -Inactive: 220148 kB -SwapTotal: 2031608 kB -SwapFree: 2031608 kB -Dirty: 76 kB -Writeback: 0 kB -AnonPages: 169548 kB -Mapped: 25456 kB -Slab: 27260 kB -SReclaimable: 9512 kB -SUnreclaim: 17748 kB -PageTables: 7552 kB -NFS_Unstable: 0 kB -Bounce: 0 kB -CommitLimit: 4061244 kB -Committed_AS: 278572 kB -VmallocTotal: 34359738367 kB -VmallocUsed: 2044 kB -VmallocChunk: 34359736107 kB -HugePages_Total: 0 -HugePages_Free: 0 -HugePages_Rsvd: 0 -Hugepagesize: 2048 kB diff --git a/tests/nodeinfodata/linux-nodeinfo-5.txt b/tests/nodeinfodata/linux-nodeinfo-5.txt deleted file mode 100644 index 54abb5d..0000000 --- a/tests/nodeinfodata/linux-nodeinfo-5.txt +++ /dev/null @@ -1 +0,0 @@ -CPUs: 4, MHz: 2814, Nodes: 1, Cores: 2 diff --git a/tests/nodeinfodata/linux-nodeinfo-6.cpuinfo b/tests/nodeinfodata/linux-nodeinfo-6.cpuinfo deleted file mode 100644 index a08cf26..0000000 --- a/tests/nodeinfodata/linux-nodeinfo-6.cpuinfo +++ /dev/null @@ -1,95 +0,0 @@ -processor : 0 -vendor_id : AuthenticAMD -cpu family : 15 -model : 65 -model name : Dual-Core AMD Opteron(tm) Processor 2218 -stepping : 2 -cpu MHz : 1000.000 -cache size : 1024 KB -physical id : 0 -siblings : 2 -core id : 0 -cpu cores : 2 -fpu : yes -fpu_exception : yes -cpuid level : 1 -wp : yes -flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm 3dnowext 3dnow pni cx16 lahf_lm cmp_legacy svm cr8_legacy -bogomips : 1999.99 -TLB size : 1024 4K pages -clflush size : 64 -cache_alignment : 64 -address sizes : 40 bits physical, 48 bits virtual -power management: ts fid vid ttp tm stc - -processor : 1 -vendor_id : AuthenticAMD -cpu family : 15 -model : 65 -model name : Dual-Core AMD Opteron(tm) Processor 2218 -stepping : 2 -cpu MHz : 1000.000 -cache size : 1024 KB -physical id : 1 -siblings : 2 -core id : 0 -cpu cores : 2 -fpu : yes -fpu_exception : yes -cpuid level : 1 -wp : yes -flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm 3dnowext 3dnow pni cx16 lahf_lm cmp_legacy svm cr8_legacy -bogomips : 1999.99 -TLB size : 1024 4K pages -clflush size : 64 -cache_alignment : 64 -address sizes : 40 bits physical, 48 bits virtual -power management: ts fid vid ttp tm stc - -processor : 2 -vendor_id : AuthenticAMD -cpu family : 15 -model : 65 -model name : Dual-Core AMD Opteron(tm) Processor 2218 -stepping : 2 -cpu MHz : 1000.000 -cache size : 1024 KB -physical id : 0 -siblings : 2 -core id : 1 -cpu cores : 2 -fpu : yes -fpu_exception : yes -cpuid level : 1 -wp : yes -flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm 3dnowext 3dnow pni cx16 lahf_lm cmp_legacy svm cr8_legacy -bogomips : 1999.99 -TLB size : 1024 4K pages -clflush size : 64 -cache_alignment : 64 -address sizes : 40 bits physical, 48 bits virtual -power management: ts fid vid ttp tm stc - -processor : 3 -vendor_id : AuthenticAMD -cpu family : 15 -model : 65 -model name : Dual-Core AMD Opteron(tm) Processor 2218 -stepping : 2 -cpu MHz : 1000.000 -cache size : 1024 KB -physical id : 1 -siblings : 2 -core id : 1 -cpu cores : 2 -fpu : yes -fpu_exception : yes -cpuid level : 1 -wp : yes -flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm 3dnowext 3dnow pni cx16 lahf_lm cmp_legacy svm cr8_legacy -bogomips : 1999.99 -TLB size : 1024 4K pages -clflush size : 64 -cache_alignment : 64 -address sizes : 40 bits physical, 48 bits virtual -power management: ts fid vid ttp tm stc diff --git a/tests/nodeinfodata/linux-nodeinfo-6.meminfo b/tests/nodeinfodata/linux-nodeinfo-6.meminfo deleted file mode 100644 index 6bb8f64..0000000 --- a/tests/nodeinfodata/linux-nodeinfo-6.meminfo +++ /dev/null @@ -1,28 +0,0 @@ -MemTotal: 4059272 kB -MemFree: 3532828 kB -Buffers: 16644 kB -Cached: 286152 kB -SwapCached: 0 kB -Active: 252032 kB -Inactive: 220148 kB -SwapTotal: 2031608 kB -SwapFree: 2031608 kB -Dirty: 76 kB -Writeback: 0 kB -AnonPages: 169548 kB -Mapped: 25456 kB -Slab: 27260 kB -SReclaimable: 9512 kB -SUnreclaim: 17748 kB -PageTables: 7552 kB -NFS_Unstable: 0 kB -Bounce: 0 kB -CommitLimit: 4061244 kB -Committed_AS: 278572 kB -VmallocTotal: 34359738367 kB -VmallocUsed: 2044 kB -VmallocChunk: 34359736107 kB -HugePages_Total: 0 -HugePages_Free: 0 -HugePages_Rsvd: 0 -Hugepagesize: 2048 kB diff --git a/tests/nodeinfodata/linux-nodeinfo-6.txt b/tests/nodeinfodata/linux-nodeinfo-6.txt deleted file mode 100644 index f89e35e..0000000 --- a/tests/nodeinfodata/linux-nodeinfo-6.txt +++ /dev/null @@ -1 +0,0 @@ -CPUs: 4, MHz: 1000, Nodes: 1, Cores: 2 diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1-cpu-output.txt b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1-cpu-output.txt new file mode 100644 index 0000000..09e2946 --- /dev/null +++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1-cpu-output.txt @@ -0,0 +1 @@ +CPUs: 2, MHz: 2800, Nodes: 1, Cores: 2 diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1.cpuinfo b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1.cpuinfo new file mode 100644 index 0000000..e88a48f --- /dev/null +++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1.cpuinfo @@ -0,0 +1,45 @@ +processor : 0 +vendor_id : GenuineIntel +cpu family : 15 +model : 4 +model name : Intel(R) Xeon(TM) CPU 2.80GHz +stepping : 8 +cpu MHz : 2800.000 +cache size : 2048 KB +physical id : 0 +siblings : 2 +core id : 0 +cpu cores : 2 +fpu : yes +fpu_exception : yes +cpuid level : 5 +wp : yes +flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx lm constant_tsc pni monitor ds_cpl est cid cx16 xtpr lahf_lm +bogomips : 5590.67 +clflush size : 64 +cache_alignment : 128 +address sizes : 36 bits physical, 48 bits virtual +power management: + +processor : 1 +vendor_id : GenuineIntel +cpu family : 15 +model : 4 +model name : Intel(R) Xeon(TM) CPU 2.80GHz +stepping : 8 +cpu MHz : 2800.000 +cache size : 2048 KB +physical id : 0 +siblings : 2 +core id : 1 +cpu cores : 2 +fpu : yes +fpu_exception : yes +cpuid level : 5 +wp : yes +flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx lm constant_tsc pni monitor ds_cpl est cid cx16 xtpr lahf_lm +bogomips : 5586.49 +clflush size : 64 +cache_alignment : 128 +address sizes : 36 bits physical, 48 bits virtual +power management: diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu0/online b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu0/online new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu0/online @@ -0,0 +1 @@ +1 diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu0/topology/core_id b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu0/topology/core_id new file mode 100644 index 0000000..573541a --- /dev/null +++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu0/topology/core_id @@ -0,0 +1 @@ +0 diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu0/topology/core_siblings b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu0/topology/core_siblings new file mode 100644 index 0000000..b9ad9ed --- /dev/null +++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu0/topology/core_siblings @@ -0,0 +1 @@ +00000003 diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu0/topology/core_siblings_list b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu0/topology/core_siblings_list new file mode 100644 index 0000000..8b0fab8 --- /dev/null +++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu0/topology/core_siblings_list @@ -0,0 +1 @@ +0-1 diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu0/topology/physical_package_id b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu0/topology/physical_package_id new file mode 100644 index 0000000..573541a --- /dev/null +++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu0/topology/physical_package_id @@ -0,0 +1 @@ +0 diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu0/topology/thread_siblings b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu0/topology/thread_siblings new file mode 100644 index 0000000..d347603 --- /dev/null +++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu0/topology/thread_siblings @@ -0,0 +1 @@ +00000001 diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu0/topology/thread_siblings_list b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu0/topology/thread_siblings_list new file mode 100644 index 0000000..573541a --- /dev/null +++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu0/topology/thread_siblings_list @@ -0,0 +1 @@ +0 diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/core_id b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/core_id new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/core_id @@ -0,0 +1 @@ +1 diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/core_siblings b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/core_siblings new file mode 100644 index 0000000..b9ad9ed --- /dev/null +++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/core_siblings @@ -0,0 +1 @@ +00000003 diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/core_siblings_list b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/core_siblings_list new file mode 100644 index 0000000..8b0fab8 --- /dev/null +++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/core_siblings_list @@ -0,0 +1 @@ +0-1 diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/online b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/online new file mode 100644 index 0000000..573541a --- /dev/null +++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/online @@ -0,0 +1 @@ +0 diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/physical_package_id b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/physical_package_id new file mode 100644 index 0000000..573541a --- /dev/null +++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/physical_package_id @@ -0,0 +1 @@ +0 diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/thread_siblings b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/thread_siblings new file mode 100644 index 0000000..0af11c5 --- /dev/null +++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/thread_siblings @@ -0,0 +1 @@ +00000002 diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/thread_siblings_list b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/thread_siblings_list new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/thread_siblings_list @@ -0,0 +1 @@ +1 diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/topology/core_id b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/topology/core_id new file mode 100644 index 0000000..573541a --- /dev/null +++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/topology/core_id @@ -0,0 +1 @@ +0 diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/topology/core_siblings b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/topology/core_siblings new file mode 100644 index 0000000..b9ad9ed --- /dev/null +++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/topology/core_siblings @@ -0,0 +1 @@ +00000003 diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/topology/core_siblings_list b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/topology/core_siblings_list new file mode 100644 index 0000000..8b0fab8 --- /dev/null +++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/topology/core_siblings_list @@ -0,0 +1 @@ +0-1 diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/topology/physical_package_id b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/topology/physical_package_id new file mode 100644 index 0000000..573541a --- /dev/null +++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/topology/physical_package_id @@ -0,0 +1 @@ +0 diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/topology/thread_siblings b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/topology/thread_siblings new file mode 100644 index 0000000..d347603 --- /dev/null +++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/topology/thread_siblings @@ -0,0 +1 @@ +00000001 diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/topology/thread_siblings_list b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/topology/thread_siblings_list new file mode 100644 index 0000000..573541a --- /dev/null +++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/topology/thread_siblings_list @@ -0,0 +1 @@ +0 diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/node/node0/meminfo b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/node/node0/meminfo new file mode 100644 index 0000000..ad2286a --- /dev/null +++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/node/node0/meminfo @@ -0,0 +1,28 @@ +Node 0 MemTotal: 33554432 kB +Node 0 MemFree: 12351744 kB +Node 0 MemUsed: 21202688 kB +Node 0 Active: 2086528 kB +Node 0 Inactive: 1816512 kB +Node 0 Active(anon): 174208 kB +Node 0 Inactive(anon): 3840 kB +Node 0 Active(file): 1912320 kB +Node 0 Inactive(file): 1812672 kB +Node 0 Unevictable: 0 kB +Node 0 Mlocked: 0 kB +Node 0 Dirty: 0 kB +Node 0 Writeback: 0 kB +Node 0 FilePages: 3758976 kB +Node 0 Mapped: 13440 kB +Node 0 AnonPages: 160704 kB +Node 0 Shmem: 17664 kB +Node 0 KernelStack: 2944 kB +Node 0 PageTables: 12032 kB +Node 0 NFS_Unstable: 0 kB +Node 0 Bounce: 0 kB +Node 0 WritebackTmp: 0 kB +Node 0 Slab: 315904 kB +Node 0 SReclaimable: 197824 kB +Node 0 SUnreclaim: 118080 kB +Node 0 HugePages_Total: 1024 +Node 0 HugePages_Free: 768 +Node 0 HugePages_Surp: 0 diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/node/node1/meminfo b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/node/node1/meminfo new file mode 100644 index 0000000..7666eb6 --- /dev/null +++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/node/node1/meminfo @@ -0,0 +1,28 @@ +Node 1 MemTotal: 33554432 kB +Node 1 MemFree: 11934016 kB +Node 1 MemUsed: 21620416 kB +Node 1 Active: 3225728 kB +Node 1 Inactive: 1057536 kB +Node 1 Active(anon): 154752 kB +Node 1 Inactive(anon): 80320 kB +Node 1 Active(file): 3070976 kB +Node 1 Inactive(file): 977216 kB +Node 1 Unevictable: 0 kB +Node 1 Mlocked: 0 kB +Node 1 Dirty: 192 kB +Node 1 Writeback: 0 kB +Node 1 FilePages: 4165696 kB +Node 1 Mapped: 36416 kB +Node 1 AnonPages: 117248 kB +Node 1 Shmem: 117760 kB +Node 1 KernelStack: 2144 kB +Node 1 PageTables: 10368 kB +Node 1 NFS_Unstable: 0 kB +Node 1 Bounce: 0 kB +Node 1 WritebackTmp: 0 kB +Node 1 Slab: 277888 kB +Node 1 SReclaimable: 175744 kB +Node 1 SUnreclaim: 102144 kB +Node 1 HugePages_Total: 1024 +Node 1 HugePages_Free: 1024 +Node 1 HugePages_Surp: 0 diff --git a/tests/nodeinfotest.c b/tests/nodeinfotest.c index 448e072..f227dc5 100644 --- a/tests/nodeinfotest.c +++ b/tests/nodeinfotest.c @@ -13,6 +13,7 @@ #if ! (defined __linux__ && (defined(__x86_64__) || \ defined(__amd64__) || \ + defined(__ppc64__) || \ defined(__i386__))) int @@ -23,11 +24,14 @@ main(void) #else -extern int linuxNodeInfoCPUPopulate(FILE *cpuinfo, virNodeInfoPtr nodeinfo, - bool need_hyperthreads); +extern int linuxNodeInfoCPUPopulate(FILE *cpuinfo, + char *sysfs_cpuinfo, + virNodeInfoPtr nodeinfo); static int -linuxTestCompareFiles(const char *cpuinfofile, const char *outputfile) +linuxTestCompareFiles(const char *cpuinfofile, + char *sysfs_cpuinfo, + const char *outputfile) { int ret = -1; char *actualData = NULL; @@ -43,7 +47,7 @@ linuxTestCompareFiles(const char *cpuinfofile, const char *outputfile) goto fail; memset(&nodeinfo, 0, sizeof(nodeinfo)); - if (linuxNodeInfoCPUPopulate(cpuinfo, &nodeinfo, false) < 0) { + if (linuxNodeInfoCPUPopulate(cpuinfo, sysfs_cpuinfo, &nodeinfo) < 0) { if (virTestGetDebug()) { virErrorPtr error = virSaveLastError(); if (error && error->code != VIR_ERR_OK) @@ -87,16 +91,19 @@ linuxTestNodeInfo(const void *data) { int result = -1; char *cpuinfo = NULL; + char *sysfs_cpuinfo = NULL; char *output = NULL; if (virAsprintf(&cpuinfo, "%s/nodeinfodata/linux-%s.cpuinfo", abs_srcdir, (const char*)data) < 0 || - virAsprintf(&output, "%s/nodeinfodata/linux-%s.txt", + virAsprintf(&sysfs_cpuinfo, "%s/nodeinfodata/linux-%s/cpu/", + abs_srcdir, (const char*)data) < 0 || + virAsprintf(&output, "%s/nodeinfodata/linux-%s-cpu-output.txt", abs_srcdir, (const char*)data) < 0) { goto cleanup; } - result = linuxTestCompareFiles(cpuinfo, output); + result = linuxTestCompareFiles(cpuinfo, sysfs_cpuinfo, output); cleanup: free(cpuinfo); @@ -112,12 +119,7 @@ mymain(void) int ret = 0; int i; const char *nodeData[] = { - "nodeinfo-1", - "nodeinfo-2", - "nodeinfo-3", - "nodeinfo-4", - "nodeinfo-5", - "nodeinfo-6", + "nodeinfo-sysfs-test-1", }; if (virInitialize() < 0) -- 1.7.3.4 -- Prerna Saxena Linux Technology Centre, IBM Systems and Technology Lab, Bangalore, India

On 12/01/2011 01:03 PM, Prerna Saxena wrote:
From: Prerna Saxena<prerna@linux.vnet.ibm.com> Date: Thu, 1 Dec 2011 12:47:52 +0530 Subject: [PATCH 2/5] Modify the tests/nodeinfotest.c to use sysfs in addition to proc/cpuinfo
Signed-off-by: Prerna Saxena<prerna@linux.vnet.ibm.com> One test fails due to wrong number of cores.
TEST: nodeinfotest Expect 39 'CPUs: 2, MHz: 2800, Nodes: 1, Cores: 2 ' Actual 39 'CPUs: 2, MHz: 2800, Nodes: 1, Cores: 1 ' ! 1 FAIL ACK with this nit fixed.

On 12/01/2011 01:03 PM, Prerna Saxena wrote:
From: Prerna Saxena<prerna@linux.vnet.ibm.com> Date: Thu, 1 Dec 2011 12:47:52 +0530 Subject: [PATCH 2/5] Modify the tests/nodeinfotest.c to use sysfs in addition to proc/cpuinfo
Signed-off-by: Prerna Saxena<prerna@linux.vnet.ibm.com> --- tests/nodeinfodata/linux-nodeinfo-1.cpuinfo | 45 --------- tests/nodeinfodata/linux-nodeinfo-1.meminfo | 28 ------ tests/nodeinfodata/linux-nodeinfo-1.txt | 1 - tests/nodeinfodata/linux-nodeinfo-2.cpuinfo | 47 --------- tests/nodeinfodata/linux-nodeinfo-2.meminfo | 28 ------ tests/nodeinfodata/linux-nodeinfo-2.txt | 1 - tests/nodeinfodata/linux-nodeinfo-3.cpuinfo | 99 -------------------- tests/nodeinfodata/linux-nodeinfo-3.meminfo | 28 ------ tests/nodeinfodata/linux-nodeinfo-3.txt | 1 - tests/nodeinfodata/linux-nodeinfo-4.cpuinfo | 95 ------------------- tests/nodeinfodata/linux-nodeinfo-4.meminfo | 28 ------ tests/nodeinfodata/linux-nodeinfo-4.txt | 1 - tests/nodeinfodata/linux-nodeinfo-5.cpuinfo | 95 ------------------- tests/nodeinfodata/linux-nodeinfo-5.meminfo | 28 ------ tests/nodeinfodata/linux-nodeinfo-5.txt | 1 - tests/nodeinfodata/linux-nodeinfo-6.cpuinfo | 95 ------------------- tests/nodeinfodata/linux-nodeinfo-6.meminfo | 28 ------ tests/nodeinfodata/linux-nodeinfo-6.txt | 1 - .../linux-nodeinfo-sysfs-test-1-cpu-output.txt | 1 + .../linux-nodeinfo-sysfs-test-1.cpuinfo | 45 +++++++++ .../linux-nodeinfo-sysfs-test-1/cpu/cpu0/online | 1 + .../cpu/cpu0/topology/core_id | 1 + .../cpu/cpu0/topology/core_siblings | 1 + .../cpu/cpu0/topology/core_siblings_list | 1 + .../cpu/cpu0/topology/physical_package_id | 1 + .../cpu/cpu0/topology/thread_siblings | 1 + .../cpu/cpu0/topology/thread_siblings_list | 1 + .../linux-nodeinfo-sysfs-test-1/cpu/cpu1/core_id | 1 + .../cpu/cpu1/core_siblings | 1 + .../cpu/cpu1/core_siblings_list | 1 + .../linux-nodeinfo-sysfs-test-1/cpu/cpu1/online | 1 + .../cpu/cpu1/physical_package_id | 1 + .../cpu/cpu1/thread_siblings | 1 + .../cpu/cpu1/thread_siblings_list | 1 + .../cpu/cpu1/topology/core_id | 1 + .../cpu/cpu1/topology/core_siblings | 1 + .../cpu/cpu1/topology/core_siblings_list | 1 + .../cpu/cpu1/topology/physical_package_id | 1 + .../cpu/cpu1/topology/thread_siblings | 1 + .../cpu/cpu1/topology/thread_siblings_list | 1 + .../linux-nodeinfo-sysfs-test-1/node/node0/meminfo | 28 ++++++ .../linux-nodeinfo-sysfs-test-1/node/node1/meminfo | 28 ++++++ tests/nodeinfotest.c | 26 +++--- 43 files changed, 136 insertions(+), 662 deletions(-)
diff --git a/tests/nodeinfodata/linux-nodeinfo-1.cpuinfo b/tests/nodeinfodata/linux-nodeinfo-1.cpuinfo deleted file mode 100644 index e88a48f..0000000 --- a/tests/nodeinfodata/linux-nodeinfo-1.cpuinfo +++ /dev/null @@ -1,45 +0,0 @@ -processor : 0 -vendor_id : GenuineIntel -cpu family : 15 -model : 4 -model name : Intel(R) Xeon(TM) CPU 2.80GHz -stepping : 8 -cpu MHz : 2800.000 -cache size : 2048 KB -physical id : 0 -siblings : 2 -core id : 0 -cpu cores : 2 -fpu : yes -fpu_exception : yes -cpuid level : 5 -wp : yes -flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx lm constant_tsc pni monitor ds_cpl est cid cx16 xtpr lahf_lm -bogomips : 5590.67 -clflush size : 64 -cache_alignment : 128 -address sizes : 36 bits physical, 48 bits virtual -power management: - -processor : 1 -vendor_id : GenuineIntel -cpu family : 15 -model : 4 -model name : Intel(R) Xeon(TM) CPU 2.80GHz -stepping : 8 -cpu MHz : 2800.000 -cache size : 2048 KB -physical id : 0 -siblings : 2 -core id : 1 -cpu cores : 2 -fpu : yes -fpu_exception : yes -cpuid level : 5 -wp : yes -flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx lm constant_tsc pni monitor ds_cpl est cid cx16 xtpr lahf_lm -bogomips : 5586.49 -clflush size : 64 -cache_alignment : 128 -address sizes : 36 bits physical, 48 bits virtual -power management: diff --git a/tests/nodeinfodata/linux-nodeinfo-1.meminfo b/tests/nodeinfodata/linux-nodeinfo-1.meminfo deleted file mode 100644 index dd5565e..0000000 --- a/tests/nodeinfodata/linux-nodeinfo-1.meminfo +++ /dev/null @@ -1,28 +0,0 @@ -MemTotal: 2053960 kB -MemFree: 157792 kB -Buffers: 209440 kB -Cached: 660788 kB -SwapCached: 76 kB -Active: 1416036 kB -Inactive: 178872 kB -SwapTotal: 2064376 kB -SwapFree: 2063940 kB -Dirty: 1736 kB -Writeback: 0 kB -AnonPages: 723984 kB -Mapped: 105208 kB -Slab: 225000 kB -SReclaimable: 172568 kB -SUnreclaim: 52432 kB -PageTables: 40224 kB -NFS_Unstable: 0 kB -Bounce: 0 kB -CommitLimit: 3091356 kB -Committed_AS: 1270588 kB -VmallocTotal: 34359738367 kB -VmallocUsed: 30640 kB -VmallocChunk: 34359705907 kB -HugePages_Total: 0 -HugePages_Free: 0 -HugePages_Rsvd: 0 -Hugepagesize: 2048 kB diff --git a/tests/nodeinfodata/linux-nodeinfo-1.txt b/tests/nodeinfodata/linux-nodeinfo-1.txt deleted file mode 100644 index 09e2946..0000000 --- a/tests/nodeinfodata/linux-nodeinfo-1.txt +++ /dev/null @@ -1 +0,0 @@ -CPUs: 2, MHz: 2800, Nodes: 1, Cores: 2 diff --git a/tests/nodeinfodata/linux-nodeinfo-2.cpuinfo b/tests/nodeinfodata/linux-nodeinfo-2.cpuinfo deleted file mode 100644 index 95d96e1..0000000 --- a/tests/nodeinfodata/linux-nodeinfo-2.cpuinfo +++ /dev/null @@ -1,47 +0,0 @@ -processor : 0 -vendor_id : AuthenticAMD -cpu family : 15 -model : 75 -model name : AMD Athlon(tm) 64 X2 Dual Core Processor 4200+ -stepping : 2 -cpu MHz : 2211.364 -cache size : 512 KB -physical id : 0 -siblings : 2 -core id : 0 -cpu cores : 2 -fpu : yes -fpu_exception : yes -cpuid level : 1 -wp : yes -flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm 3dnowext 3dnow pni cx16 lahf_lm cmp_legacy svm extapic cr8_legacy -bogomips : 4424.80 -TLB size : 1024 4K pages -clflush size : 64 -cache_alignment : 64 -address sizes : 40 bits physical, 48 bits virtual -power management: ts fid vid ttp tm stc - -processor : 1 -vendor_id : AuthenticAMD -cpu family : 15 -model : 75 -model name : AMD Athlon(tm) 64 X2 Dual Core Processor 4200+ -stepping : 2 -cpu MHz : 2211.364 -cache size : 512 KB -physical id : 0 -siblings : 2 -core id : 1 -cpu cores : 2 -fpu : yes -fpu_exception : yes -cpuid level : 1 -wp : yes -flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm 3dnowext 3dnow pni cx16 lahf_lm cmp_legacy svm extapic cr8_legacy -bogomips : 4422.14 -TLB size : 1024 4K pages -clflush size : 64 -cache_alignment : 64 -address sizes : 40 bits physical, 48 bits virtual -power management: ts fid vid ttp tm stc diff --git a/tests/nodeinfodata/linux-nodeinfo-2.meminfo b/tests/nodeinfodata/linux-nodeinfo-2.meminfo deleted file mode 100644 index e1d9b86..0000000 --- a/tests/nodeinfodata/linux-nodeinfo-2.meminfo +++ /dev/null @@ -1,28 +0,0 @@ -MemTotal: 4059540 kB -MemFree: 3525008 kB -Buffers: 24480 kB -Cached: 282300 kB -SwapCached: 0 kB -Active: 230980 kB -Inactive: 243276 kB -SwapTotal: 2031608 kB -SwapFree: 2031608 kB -Dirty: 200 kB -Writeback: 0 kB -AnonPages: 167376 kB -Mapped: 31204 kB -Slab: 34904 kB -SReclaimable: 15544 kB -SUnreclaim: 19360 kB -PageTables: 7704 kB -NFS_Unstable: 0 kB -Bounce: 0 kB -CommitLimit: 4061376 kB -Committed_AS: 265176 kB -VmallocTotal: 34359738367 kB -VmallocUsed: 1736 kB -VmallocChunk: 34359736147 kB -HugePages_Total: 0 -HugePages_Free: 0 -HugePages_Rsvd: 0 -Hugepagesize: 2048 kB diff --git a/tests/nodeinfodata/linux-nodeinfo-2.txt b/tests/nodeinfodata/linux-nodeinfo-2.txt deleted file mode 100644 index e4eea94..0000000 --- a/tests/nodeinfodata/linux-nodeinfo-2.txt +++ /dev/null @@ -1 +0,0 @@ -CPUs: 2, MHz: 2211, Nodes: 1, Cores: 2 diff --git a/tests/nodeinfodata/linux-nodeinfo-3.cpuinfo b/tests/nodeinfodata/linux-nodeinfo-3.cpuinfo deleted file mode 100644 index 94e3c01..0000000 --- a/tests/nodeinfodata/linux-nodeinfo-3.cpuinfo +++ /dev/null @@ -1,99 +0,0 @@ -processor : 0 -vendor_id : GenuineIntel -cpu family : 6 -model : 15 -model name : Intel(R) Xeon(R) CPU 5110 @ 1.60GHz -stepping : 6 -cpu MHz : 1595.925 -cache size : 4096 KB -physical id : 0 -siblings : 2 -core id : 0 -cpu cores : 2 -fpu : yes -fpu_exception : yes -cpuid level : 10 -wp : yes -flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov -pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall lm constant_tsc -pni monitor ds_cpl vmx tm2 ssse3 cx16 xtpr dca lahf_lm -bogomips : 3193.88 -clflush size : 64 -cache_alignment : 64 -address sizes : 36 bits physical, 48 bits virtual -power management: - -processor : 1 -vendor_id : GenuineIntel -cpu family : 6 -model : 15 -model name : Intel(R) Xeon(R) CPU 5110 @ 1.60GHz -stepping : 6 -cpu MHz : 1595.925 -cache size : 4096 KB -physical id : 3 -siblings : 2 -core id : 0 -cpu cores : 2 -fpu : yes -fpu_exception : yes -cpuid level : 10 -wp : yes -flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov -pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall lm constant_tsc -pni monitor ds_cpl vmx tm2 ssse3 cx16 xtpr dca lahf_lm -bogomips : 3191.89 -clflush size : 64 -cache_alignment : 64 -address sizes : 36 bits physical, 48 bits virtual -power management: - -processor : 2 -vendor_id : GenuineIntel -cpu family : 6 -model : 15 -model name : Intel(R) Xeon(R) CPU 5110 @ 1.60GHz -stepping : 6 -cpu MHz : 1595.925 -cache size : 4096 KB -physical id : 0 -siblings : 2 -core id : 1 -cpu cores : 2 -fpu : yes -fpu_exception : yes -cpuid level : 10 -wp : yes -flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov -pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall lm constant_tsc -pni monitor ds_cpl vmx tm2 ssse3 cx16 xtpr dca lahf_lm -bogomips : 3191.88 -clflush size : 64 -cache_alignment : 64 -address sizes : 36 bits physical, 48 bits virtual -power management: - -processor : 3 -vendor_id : GenuineIntel -cpu family : 6 -model : 15 -model name : Intel(R) Xeon(R) CPU 5110 @ 1.60GHz -stepping : 6 -cpu MHz : 1595.925 -cache size : 4096 KB -physical id : 3 -siblings : 2 -core id : 1 -cpu cores : 2 -fpu : yes -fpu_exception : yes -cpuid level : 10 -wp : yes -flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov -pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall lm constant_tsc -pni monitor ds_cpl vmx tm2 ssse3 cx16 xtpr dca lahf_lm -bogomips : 3191.87 -clflush size : 64 -cache_alignment : 64 -address sizes : 36 bits physical, 48 bits virtual -power management: diff --git a/tests/nodeinfodata/linux-nodeinfo-3.meminfo b/tests/nodeinfodata/linux-nodeinfo-3.meminfo deleted file mode 100644 index 6bb8f64..0000000 --- a/tests/nodeinfodata/linux-nodeinfo-3.meminfo +++ /dev/null @@ -1,28 +0,0 @@ -MemTotal: 4059272 kB -MemFree: 3532828 kB -Buffers: 16644 kB -Cached: 286152 kB -SwapCached: 0 kB -Active: 252032 kB -Inactive: 220148 kB -SwapTotal: 2031608 kB -SwapFree: 2031608 kB -Dirty: 76 kB -Writeback: 0 kB -AnonPages: 169548 kB -Mapped: 25456 kB -Slab: 27260 kB -SReclaimable: 9512 kB -SUnreclaim: 17748 kB -PageTables: 7552 kB -NFS_Unstable: 0 kB -Bounce: 0 kB -CommitLimit: 4061244 kB -Committed_AS: 278572 kB -VmallocTotal: 34359738367 kB -VmallocUsed: 2044 kB -VmallocChunk: 34359736107 kB -HugePages_Total: 0 -HugePages_Free: 0 -HugePages_Rsvd: 0 -Hugepagesize: 2048 kB diff --git a/tests/nodeinfodata/linux-nodeinfo-3.txt b/tests/nodeinfodata/linux-nodeinfo-3.txt deleted file mode 100644 index 17d4d8e..0000000 --- a/tests/nodeinfodata/linux-nodeinfo-3.txt +++ /dev/null @@ -1 +0,0 @@ -CPUs: 4, MHz: 1595, Nodes: 1, Cores: 2 diff --git a/tests/nodeinfodata/linux-nodeinfo-4.cpuinfo b/tests/nodeinfodata/linux-nodeinfo-4.cpuinfo deleted file mode 100644 index 535a29d..0000000 --- a/tests/nodeinfodata/linux-nodeinfo-4.cpuinfo +++ /dev/null @@ -1,95 +0,0 @@ -processor : 0 -vendor_id : AuthenticAMD -cpu family : 16 -model : 2 -model name : AMD Processor model unknown -stepping : 0 -cpu MHz : 1000.000 -cache size : 512 KB -physical id : 0 -siblings : 4 -core id : 0 -cpu cores : 4 -fpu : yes -fpu_exception : yes -cpuid level : 5 -wp : yes -flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy altmovcr8 abm sse4a misalignsse 3dnowprefetch osvw -bogomips : 4131.46 -TLB size : 1024 4K pages -clflush size : 64 -cache_alignment : 64 -address sizes : 48 bits physical, 48 bits virtual -power management: ts ttp tm stc 100mhzsteps hwpstate [8] - -processor : 1 -vendor_id : AuthenticAMD -cpu family : 16 -model : 2 -model name : AMD Processor model unknown -stepping : 0 -cpu MHz : 1000.000 -cache size : 512 KB -physical id : 0 -siblings : 4 -core id : 1 -cpu cores : 4 -fpu : yes -fpu_exception : yes -cpuid level : 5 -wp : yes -flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy altmovcr8 abm sse4a misalignsse 3dnowprefetch osvw -bogomips : 3200.13 -TLB size : 1024 4K pages -clflush size : 64 -cache_alignment : 64 -address sizes : 48 bits physical, 48 bits virtual -power management: ts ttp tm stc 100mhzsteps hwpstate [8] - -processor : 2 -vendor_id : AuthenticAMD -cpu family : 16 -model : 2 -model name : AMD Processor model unknown -stepping : 0 -cpu MHz : 1000.000 -cache size : 512 KB -physical id : 0 -siblings : 4 -core id : 2 -cpu cores : 4 -fpu : yes -fpu_exception : yes -cpuid level : 5 -wp : yes -flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy altmovcr8 abm sse4a misalignsse 3dnowprefetch osvw -bogomips : 3200.14 -TLB size : 1024 4K pages -clflush size : 64 -cache_alignment : 64 -address sizes : 48 bits physical, 48 bits virtual -power management: ts ttp tm stc 100mhzsteps hwpstate [8] - -processor : 3 -vendor_id : AuthenticAMD -cpu family : 16 -model : 2 -model name : AMD Processor model unknown -stepping : 0 -cpu MHz : 1000.000 -cache size : 512 KB -physical id : 0 -siblings : 4 -core id : 3 -cpu cores : 4 -fpu : yes -fpu_exception : yes -cpuid level : 5 -wp : yes -flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy altmovcr8 abm sse4a misalignsse 3dnowprefetch osvw -bogomips : 3200.01 -TLB size : 1024 4K pages -clflush size : 64 -cache_alignment : 64 -address sizes : 48 bits physical, 48 bits virtual -power management: ts ttp tm stc 100mhzsteps hwpstate [8] diff --git a/tests/nodeinfodata/linux-nodeinfo-4.meminfo b/tests/nodeinfodata/linux-nodeinfo-4.meminfo deleted file mode 100644 index 6bb8f64..0000000 --- a/tests/nodeinfodata/linux-nodeinfo-4.meminfo +++ /dev/null @@ -1,28 +0,0 @@ -MemTotal: 4059272 kB -MemFree: 3532828 kB -Buffers: 16644 kB -Cached: 286152 kB -SwapCached: 0 kB -Active: 252032 kB -Inactive: 220148 kB -SwapTotal: 2031608 kB -SwapFree: 2031608 kB -Dirty: 76 kB -Writeback: 0 kB -AnonPages: 169548 kB -Mapped: 25456 kB -Slab: 27260 kB -SReclaimable: 9512 kB -SUnreclaim: 17748 kB -PageTables: 7552 kB -NFS_Unstable: 0 kB -Bounce: 0 kB -CommitLimit: 4061244 kB -Committed_AS: 278572 kB -VmallocTotal: 34359738367 kB -VmallocUsed: 2044 kB -VmallocChunk: 34359736107 kB -HugePages_Total: 0 -HugePages_Free: 0 -HugePages_Rsvd: 0 -Hugepagesize: 2048 kB diff --git a/tests/nodeinfodata/linux-nodeinfo-4.txt b/tests/nodeinfodata/linux-nodeinfo-4.txt deleted file mode 100644 index 5a5c919..0000000 --- a/tests/nodeinfodata/linux-nodeinfo-4.txt +++ /dev/null @@ -1 +0,0 @@ -CPUs: 4, MHz: 1000, Nodes: 1, Cores: 4 diff --git a/tests/nodeinfodata/linux-nodeinfo-5.cpuinfo b/tests/nodeinfodata/linux-nodeinfo-5.cpuinfo deleted file mode 100644 index 7cb6e18..0000000 --- a/tests/nodeinfodata/linux-nodeinfo-5.cpuinfo +++ /dev/null @@ -1,95 +0,0 @@ -processor : 0 -vendor_id : AuthenticAMD -cpu family : 15 -model : 65 -model name : Dual-Core AMD Opteron(tm) Processor 2220 -stepping : 3 -cpu MHz : 2814.921 -cache size : 1024 KB -physical id : 0 -siblings : 2 -core id : 0 -cpu cores : 2 -fpu : yes -fpu_exception : yes -cpuid level : 1 -wp : yes -flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm 3dnowext 3dnow pni cx16 lahf_lm cmp_legacy svm extapic cr8_legacy -bogomips : 5633.58 -TLB size : 1024 4K pages -clflush size : 64 -cache_alignment : 64 -address sizes : 40 bits physical, 48 bits virtual -power management: ts fid vid ttp tm stc - -processor : 1 -vendor_id : AuthenticAMD -cpu family : 15 -model : 65 -model name : Dual-Core AMD Opteron(tm) Processor 2220 -stepping : 3 -cpu MHz : 2814.921 -cache size : 1024 KB -physical id : 0 -siblings : 2 -core id : 1 -cpu cores : 2 -fpu : yes -fpu_exception : yes -cpuid level : 1 -wp : yes -flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm 3dnowext 3dnow pni cx16 lahf_lm cmp_legacy svm extapic cr8_legacy -bogomips : 5629.01 -TLB size : 1024 4K pages -clflush size : 64 -cache_alignment : 64 -address sizes : 40 bits physical, 48 bits virtual -power management: ts fid vid ttp tm stc - -processor : 2 -vendor_id : AuthenticAMD -cpu family : 15 -model : 65 -model name : Dual-Core AMD Opteron(tm) Processor 2220 -stepping : 3 -cpu MHz : 2814.921 -cache size : 1024 KB -physical id : 1 -siblings : 2 -core id : 0 -cpu cores : 2 -fpu : yes -fpu_exception : yes -cpuid level : 1 -wp : yes -flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm 3dnowext 3dnow pni cx16 lahf_lm cmp_legacy svm extapic cr8_legacy -bogomips : 5628.94 -TLB size : 1024 4K pages -clflush size : 64 -cache_alignment : 64 -address sizes : 40 bits physical, 48 bits virtual -power management: ts fid vid ttp tm stc - -processor : 3 -vendor_id : AuthenticAMD -cpu family : 15 -model : 65 -model name : Dual-Core AMD Opteron(tm) Processor 2220 -stepping : 3 -cpu MHz : 2814.921 -cache size : 1024 KB -physical id : 1 -siblings : 2 -core id : 1 -cpu cores : 2 -fpu : yes -fpu_exception : yes -cpuid level : 1 -wp : yes -flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm 3dnowext 3dnow pni cx16 lahf_lm cmp_legacy svm extapic cr8_legacy -bogomips : 5628.86 -TLB size : 1024 4K pages -clflush size : 64 -cache_alignment : 64 -address sizes : 40 bits physical, 48 bits virtual -power management: ts fid vid ttp tm stc diff --git a/tests/nodeinfodata/linux-nodeinfo-5.meminfo b/tests/nodeinfodata/linux-nodeinfo-5.meminfo deleted file mode 100644 index 6bb8f64..0000000 --- a/tests/nodeinfodata/linux-nodeinfo-5.meminfo +++ /dev/null @@ -1,28 +0,0 @@ -MemTotal: 4059272 kB -MemFree: 3532828 kB -Buffers: 16644 kB -Cached: 286152 kB -SwapCached: 0 kB -Active: 252032 kB -Inactive: 220148 kB -SwapTotal: 2031608 kB -SwapFree: 2031608 kB -Dirty: 76 kB -Writeback: 0 kB -AnonPages: 169548 kB -Mapped: 25456 kB -Slab: 27260 kB -SReclaimable: 9512 kB -SUnreclaim: 17748 kB -PageTables: 7552 kB -NFS_Unstable: 0 kB -Bounce: 0 kB -CommitLimit: 4061244 kB -Committed_AS: 278572 kB -VmallocTotal: 34359738367 kB -VmallocUsed: 2044 kB -VmallocChunk: 34359736107 kB -HugePages_Total: 0 -HugePages_Free: 0 -HugePages_Rsvd: 0 -Hugepagesize: 2048 kB diff --git a/tests/nodeinfodata/linux-nodeinfo-5.txt b/tests/nodeinfodata/linux-nodeinfo-5.txt deleted file mode 100644 index 54abb5d..0000000 --- a/tests/nodeinfodata/linux-nodeinfo-5.txt +++ /dev/null @@ -1 +0,0 @@ -CPUs: 4, MHz: 2814, Nodes: 1, Cores: 2 diff --git a/tests/nodeinfodata/linux-nodeinfo-6.cpuinfo b/tests/nodeinfodata/linux-nodeinfo-6.cpuinfo deleted file mode 100644 index a08cf26..0000000 --- a/tests/nodeinfodata/linux-nodeinfo-6.cpuinfo +++ /dev/null @@ -1,95 +0,0 @@ -processor : 0 -vendor_id : AuthenticAMD -cpu family : 15 -model : 65 -model name : Dual-Core AMD Opteron(tm) Processor 2218 -stepping : 2 -cpu MHz : 1000.000 -cache size : 1024 KB -physical id : 0 -siblings : 2 -core id : 0 -cpu cores : 2 -fpu : yes -fpu_exception : yes -cpuid level : 1 -wp : yes -flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm 3dnowext 3dnow pni cx16 lahf_lm cmp_legacy svm cr8_legacy -bogomips : 1999.99 -TLB size : 1024 4K pages -clflush size : 64 -cache_alignment : 64 -address sizes : 40 bits physical, 48 bits virtual -power management: ts fid vid ttp tm stc - -processor : 1 -vendor_id : AuthenticAMD -cpu family : 15 -model : 65 -model name : Dual-Core AMD Opteron(tm) Processor 2218 -stepping : 2 -cpu MHz : 1000.000 -cache size : 1024 KB -physical id : 1 -siblings : 2 -core id : 0 -cpu cores : 2 -fpu : yes -fpu_exception : yes -cpuid level : 1 -wp : yes -flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm 3dnowext 3dnow pni cx16 lahf_lm cmp_legacy svm cr8_legacy -bogomips : 1999.99 -TLB size : 1024 4K pages -clflush size : 64 -cache_alignment : 64 -address sizes : 40 bits physical, 48 bits virtual -power management: ts fid vid ttp tm stc - -processor : 2 -vendor_id : AuthenticAMD -cpu family : 15 -model : 65 -model name : Dual-Core AMD Opteron(tm) Processor 2218 -stepping : 2 -cpu MHz : 1000.000 -cache size : 1024 KB -physical id : 0 -siblings : 2 -core id : 1 -cpu cores : 2 -fpu : yes -fpu_exception : yes -cpuid level : 1 -wp : yes -flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm 3dnowext 3dnow pni cx16 lahf_lm cmp_legacy svm cr8_legacy -bogomips : 1999.99 -TLB size : 1024 4K pages -clflush size : 64 -cache_alignment : 64 -address sizes : 40 bits physical, 48 bits virtual -power management: ts fid vid ttp tm stc - -processor : 3 -vendor_id : AuthenticAMD -cpu family : 15 -model : 65 -model name : Dual-Core AMD Opteron(tm) Processor 2218 -stepping : 2 -cpu MHz : 1000.000 -cache size : 1024 KB -physical id : 1 -siblings : 2 -core id : 1 -cpu cores : 2 -fpu : yes -fpu_exception : yes -cpuid level : 1 -wp : yes -flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm 3dnowext 3dnow pni cx16 lahf_lm cmp_legacy svm cr8_legacy -bogomips : 1999.99 -TLB size : 1024 4K pages -clflush size : 64 -cache_alignment : 64 -address sizes : 40 bits physical, 48 bits virtual -power management: ts fid vid ttp tm stc diff --git a/tests/nodeinfodata/linux-nodeinfo-6.meminfo b/tests/nodeinfodata/linux-nodeinfo-6.meminfo deleted file mode 100644 index 6bb8f64..0000000 --- a/tests/nodeinfodata/linux-nodeinfo-6.meminfo +++ /dev/null @@ -1,28 +0,0 @@ -MemTotal: 4059272 kB -MemFree: 3532828 kB -Buffers: 16644 kB -Cached: 286152 kB -SwapCached: 0 kB -Active: 252032 kB -Inactive: 220148 kB -SwapTotal: 2031608 kB -SwapFree: 2031608 kB -Dirty: 76 kB -Writeback: 0 kB -AnonPages: 169548 kB -Mapped: 25456 kB -Slab: 27260 kB -SReclaimable: 9512 kB -SUnreclaim: 17748 kB -PageTables: 7552 kB -NFS_Unstable: 0 kB -Bounce: 0 kB -CommitLimit: 4061244 kB -Committed_AS: 278572 kB -VmallocTotal: 34359738367 kB -VmallocUsed: 2044 kB -VmallocChunk: 34359736107 kB -HugePages_Total: 0 -HugePages_Free: 0 -HugePages_Rsvd: 0 -Hugepagesize: 2048 kB diff --git a/tests/nodeinfodata/linux-nodeinfo-6.txt b/tests/nodeinfodata/linux-nodeinfo-6.txt deleted file mode 100644 index f89e35e..0000000 --- a/tests/nodeinfodata/linux-nodeinfo-6.txt +++ /dev/null @@ -1 +0,0 @@ -CPUs: 4, MHz: 1000, Nodes: 1, Cores: 2 diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1-cpu-output.txt b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1-cpu-output.txt new file mode 100644 index 0000000..09e2946 --- /dev/null +++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1-cpu-output.txt @@ -0,0 +1 @@ +CPUs: 2, MHz: 2800, Nodes: 1, Cores: 2 diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1.cpuinfo b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1.cpuinfo new file mode 100644 index 0000000..e88a48f --- /dev/null +++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1.cpuinfo @@ -0,0 +1,45 @@ +processor : 0 +vendor_id : GenuineIntel +cpu family : 15 +model : 4 +model name : Intel(R) Xeon(TM) CPU 2.80GHz +stepping : 8 +cpu MHz : 2800.000 +cache size : 2048 KB +physical id : 0 +siblings : 2 +core id : 0 +cpu cores : 2 +fpu : yes +fpu_exception : yes +cpuid level : 5 +wp : yes +flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx lm constant_tsc pni monitor ds_cpl est cid cx16 xtpr lahf_lm +bogomips : 5590.67 +clflush size : 64 +cache_alignment : 128 +address sizes : 36 bits physical, 48 bits virtual +power management: + +processor : 1 +vendor_id : GenuineIntel +cpu family : 15 +model : 4 +model name : Intel(R) Xeon(TM) CPU 2.80GHz +stepping : 8 +cpu MHz : 2800.000 +cache size : 2048 KB +physical id : 0 +siblings : 2 +core id : 1 +cpu cores : 2 +fpu : yes +fpu_exception : yes +cpuid level : 5 +wp : yes +flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx lm constant_tsc pni monitor ds_cpl est cid cx16 xtpr lahf_lm +bogomips : 5586.49 +clflush size : 64 +cache_alignment : 128 +address sizes : 36 bits physical, 48 bits virtual +power management: diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu0/online b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu0/online new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu0/online @@ -0,0 +1 @@ +1 diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu0/topology/core_id b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu0/topology/core_id new file mode 100644 index 0000000..573541a --- /dev/null +++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu0/topology/core_id @@ -0,0 +1 @@ +0 diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu0/topology/core_siblings b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu0/topology/core_siblings new file mode 100644 index 0000000..b9ad9ed --- /dev/null +++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu0/topology/core_siblings @@ -0,0 +1 @@ +00000003 diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu0/topology/core_siblings_list b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu0/topology/core_siblings_list new file mode 100644 index 0000000..8b0fab8 --- /dev/null +++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu0/topology/core_siblings_list @@ -0,0 +1 @@ +0-1 diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu0/topology/physical_package_id b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu0/topology/physical_package_id new file mode 100644 index 0000000..573541a --- /dev/null +++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu0/topology/physical_package_id @@ -0,0 +1 @@ +0 diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu0/topology/thread_siblings b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu0/topology/thread_siblings new file mode 100644 index 0000000..d347603 --- /dev/null +++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu0/topology/thread_siblings @@ -0,0 +1 @@ +00000001 diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu0/topology/thread_siblings_list b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu0/topology/thread_siblings_list new file mode 100644 index 0000000..573541a --- /dev/null +++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu0/topology/thread_siblings_list @@ -0,0 +1 @@ +0 diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/core_id b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/core_id new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/core_id @@ -0,0 +1 @@ +1 diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/core_siblings b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/core_siblings new file mode 100644 index 0000000..b9ad9ed --- /dev/null +++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/core_siblings @@ -0,0 +1 @@ +00000003 diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/core_siblings_list b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/core_siblings_list new file mode 100644 index 0000000..8b0fab8 --- /dev/null +++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/core_siblings_list @@ -0,0 +1 @@ +0-1 diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/online b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/online new file mode 100644 index 0000000..573541a --- /dev/null +++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/online @@ -0,0 +1 @@ +0 diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/physical_package_id b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/physical_package_id new file mode 100644 index 0000000..573541a --- /dev/null +++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/physical_package_id @@ -0,0 +1 @@ +0 diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/thread_siblings b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/thread_siblings new file mode 100644 index 0000000..0af11c5 --- /dev/null +++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/thread_siblings @@ -0,0 +1 @@ +00000002 diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/thread_siblings_list b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/thread_siblings_list new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/thread_siblings_list @@ -0,0 +1 @@ +1 diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/topology/core_id b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/topology/core_id new file mode 100644 index 0000000..573541a --- /dev/null +++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/topology/core_id @@ -0,0 +1 @@ +0 diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/topology/core_siblings b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/topology/core_siblings new file mode 100644 index 0000000..b9ad9ed --- /dev/null +++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/topology/core_siblings @@ -0,0 +1 @@ +00000003 diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/topology/core_siblings_list b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/topology/core_siblings_list new file mode 100644 index 0000000..8b0fab8 --- /dev/null +++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/topology/core_siblings_list @@ -0,0 +1 @@ +0-1 diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/topology/physical_package_id b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/topology/physical_package_id new file mode 100644 index 0000000..573541a --- /dev/null +++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/topology/physical_package_id @@ -0,0 +1 @@ +0 diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/topology/thread_siblings b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/topology/thread_siblings new file mode 100644 index 0000000..d347603 --- /dev/null +++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/topology/thread_siblings @@ -0,0 +1 @@ +00000001 diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/topology/thread_siblings_list b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/topology/thread_siblings_list new file mode 100644 index 0000000..573541a --- /dev/null +++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/topology/thread_siblings_list @@ -0,0 +1 @@ +0 diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/node/node0/meminfo b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/node/node0/meminfo new file mode 100644 index 0000000..ad2286a --- /dev/null +++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/node/node0/meminfo @@ -0,0 +1,28 @@ +Node 0 MemTotal: 33554432 kB +Node 0 MemFree: 12351744 kB +Node 0 MemUsed: 21202688 kB +Node 0 Active: 2086528 kB +Node 0 Inactive: 1816512 kB +Node 0 Active(anon): 174208 kB +Node 0 Inactive(anon): 3840 kB +Node 0 Active(file): 1912320 kB +Node 0 Inactive(file): 1812672 kB +Node 0 Unevictable: 0 kB +Node 0 Mlocked: 0 kB +Node 0 Dirty: 0 kB +Node 0 Writeback: 0 kB +Node 0 FilePages: 3758976 kB +Node 0 Mapped: 13440 kB +Node 0 AnonPages: 160704 kB +Node 0 Shmem: 17664 kB +Node 0 KernelStack: 2944 kB +Node 0 PageTables: 12032 kB +Node 0 NFS_Unstable: 0 kB +Node 0 Bounce: 0 kB +Node 0 WritebackTmp: 0 kB +Node 0 Slab: 315904 kB +Node 0 SReclaimable: 197824 kB +Node 0 SUnreclaim: 118080 kB +Node 0 HugePages_Total: 1024 +Node 0 HugePages_Free: 768 +Node 0 HugePages_Surp: 0 diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/node/node1/meminfo b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/node/node1/meminfo new file mode 100644 index 0000000..7666eb6 --- /dev/null +++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/node/node1/meminfo @@ -0,0 +1,28 @@ +Node 1 MemTotal: 33554432 kB +Node 1 MemFree: 11934016 kB +Node 1 MemUsed: 21620416 kB +Node 1 Active: 3225728 kB +Node 1 Inactive: 1057536 kB +Node 1 Active(anon): 154752 kB +Node 1 Inactive(anon): 80320 kB +Node 1 Active(file): 3070976 kB +Node 1 Inactive(file): 977216 kB +Node 1 Unevictable: 0 kB +Node 1 Mlocked: 0 kB +Node 1 Dirty: 192 kB +Node 1 Writeback: 0 kB +Node 1 FilePages: 4165696 kB +Node 1 Mapped: 36416 kB +Node 1 AnonPages: 117248 kB +Node 1 Shmem: 117760 kB +Node 1 KernelStack: 2144 kB +Node 1 PageTables: 10368 kB +Node 1 NFS_Unstable: 0 kB +Node 1 Bounce: 0 kB +Node 1 WritebackTmp: 0 kB +Node 1 Slab: 277888 kB +Node 1 SReclaimable: 175744 kB +Node 1 SUnreclaim: 102144 kB +Node 1 HugePages_Total: 1024 +Node 1 HugePages_Free: 1024 +Node 1 HugePages_Surp: 0 diff --git a/tests/nodeinfotest.c b/tests/nodeinfotest.c index 448e072..f227dc5 100644 --- a/tests/nodeinfotest.c +++ b/tests/nodeinfotest.c @@ -13,6 +13,7 @@
#if ! (defined __linux__&& (defined(__x86_64__) || \ defined(__amd64__) || \ + defined(__ppc64__) || \ defined(__i386__)))
int
Now that I also applied this on a ppc64 machine: is __ppc64__ really available on your machine? I only have __PPC64__ or __powerpc64__ defined. However, once I put __powerpc64__ into the list and thus activate the test on ppc64 I get this error: TEST: nodeinfotest Expect 39 'CPUs: 2, MHz: 2800, Nodes: 1, Cores: 2 ' Actual 36 'CPUs: 2, MHz: 0, Nodes: 1, Cores: 2 ' ! 1 FAIL This time it's a regression in the CPU frequency. So probably you don't want to mention anything about PPC64 there since the format that linuxNodeInfoCPUPopulate() parses is still from the procfs and arch-dependent *OR* you add a ppc64-specific proc file that you only read on a ppc64 host. The latter may be better since it doesn't skip the test then. Stefan

On 12/02/2011 12:53 AM, Stefan Berger wrote:
On 12/01/2011 01:03 PM, Prerna Saxena wrote:
From: Prerna Saxena<prerna@linux.vnet.ibm.com> Date: Thu, 1 Dec 2011 12:47:52 +0530 Subject: [PATCH 2/5] Modify the tests/nodeinfotest.c to use sysfs in addition to proc/cpuinfo
Signed-off-by: Prerna Saxena<prerna@linux.vnet.ibm.com> --- tests/nodeinfodata/linux-nodeinfo-1.cpuinfo | 45 --------- tests/nodeinfodata/linux-nodeinfo-1.meminfo | 28 ------ tests/nodeinfodata/linux-nodeinfo-1.txt | 1 - tests/nodeinfodata/linux-nodeinfo-2.cpuinfo | 47 --------- tests/nodeinfodata/linux-nodeinfo-2.meminfo | 28 ------ tests/nodeinfodata/linux-nodeinfo-2.txt | 1 - tests/nodeinfodata/linux-nodeinfo-3.cpuinfo | 99 -------------------- tests/nodeinfodata/linux-nodeinfo-3.meminfo | 28 ------ tests/nodeinfodata/linux-nodeinfo-3.txt | 1 - tests/nodeinfodata/linux-nodeinfo-4.cpuinfo | 95 ------------------- tests/nodeinfodata/linux-nodeinfo-4.meminfo | 28 ------ tests/nodeinfodata/linux-nodeinfo-4.txt | 1 - tests/nodeinfodata/linux-nodeinfo-5.cpuinfo | 95 ------------------- tests/nodeinfodata/linux-nodeinfo-5.meminfo | 28 ------ tests/nodeinfodata/linux-nodeinfo-5.txt | 1 - tests/nodeinfodata/linux-nodeinfo-6.cpuinfo | 95 ------------------- tests/nodeinfodata/linux-nodeinfo-6.meminfo | 28 ------ tests/nodeinfodata/linux-nodeinfo-6.txt | 1 - .../linux-nodeinfo-sysfs-test-1-cpu-output.txt | 1 + .../linux-nodeinfo-sysfs-test-1.cpuinfo | 45 +++++++++ .../linux-nodeinfo-sysfs-test-1/cpu/cpu0/online | 1 + .../cpu/cpu0/topology/core_id | 1 + .../cpu/cpu0/topology/core_siblings | 1 + .../cpu/cpu0/topology/core_siblings_list | 1 + .../cpu/cpu0/topology/physical_package_id | 1 + .../cpu/cpu0/topology/thread_siblings | 1 + .../cpu/cpu0/topology/thread_siblings_list | 1 + .../linux-nodeinfo-sysfs-test-1/cpu/cpu1/core_id | 1 + .../cpu/cpu1/core_siblings | 1 + .../cpu/cpu1/core_siblings_list | 1 + .../linux-nodeinfo-sysfs-test-1/cpu/cpu1/online | 1 + .../cpu/cpu1/physical_package_id | 1 + .../cpu/cpu1/thread_siblings | 1 + .../cpu/cpu1/thread_siblings_list | 1 + .../cpu/cpu1/topology/core_id | 1 + .../cpu/cpu1/topology/core_siblings | 1 + .../cpu/cpu1/topology/core_siblings_list | 1 + .../cpu/cpu1/topology/physical_package_id | 1 + .../cpu/cpu1/topology/thread_siblings | 1 + .../cpu/cpu1/topology/thread_siblings_list | 1 + .../linux-nodeinfo-sysfs-test-1/node/node0/meminfo | 28 ++++++ .../linux-nodeinfo-sysfs-test-1/node/node1/meminfo | 28 ++++++ tests/nodeinfotest.c | 26 +++--- 43 files changed, 136 insertions(+), 662 deletions(-)
diff --git a/tests/nodeinfodata/linux-nodeinfo-1.cpuinfo b/tests/nodeinfodata/linux-nodeinfo-1.cpuinfo deleted file mode 100644 index e88a48f..0000000 --- a/tests/nodeinfodata/linux-nodeinfo-1.cpuinfo +++ /dev/null @@ -1,45 +0,0 @@ -processor : 0 -vendor_id : GenuineIntel -cpu family : 15 -model : 4 -model name : Intel(R) Xeon(TM) CPU 2.80GHz -stepping : 8 -cpu MHz : 2800.000 -cache size : 2048 KB -physical id : 0 -siblings : 2 -core id : 0 -cpu cores : 2 -fpu : yes -fpu_exception : yes -cpuid level : 5 -wp : yes -flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx lm constant_tsc pni monitor ds_cpl est cid cx16 xtpr lahf_lm -bogomips : 5590.67 -clflush size : 64 -cache_alignment : 128 -address sizes : 36 bits physical, 48 bits virtual -power management: - -processor : 1 -vendor_id : GenuineIntel -cpu family : 15 -model : 4 -model name : Intel(R) Xeon(TM) CPU 2.80GHz -stepping : 8 -cpu MHz : 2800.000 -cache size : 2048 KB -physical id : 0 -siblings : 2 -core id : 1 -cpu cores : 2 -fpu : yes -fpu_exception : yes -cpuid level : 5 -wp : yes -flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx lm constant_tsc pni monitor ds_cpl est cid cx16 xtpr lahf_lm -bogomips : 5586.49 -clflush size : 64 -cache_alignment : 128 -address sizes : 36 bits physical, 48 bits virtual -power management: diff --git a/tests/nodeinfodata/linux-nodeinfo-1.meminfo b/tests/nodeinfodata/linux-nodeinfo-1.meminfo deleted file mode 100644 index dd5565e..0000000 --- a/tests/nodeinfodata/linux-nodeinfo-1.meminfo +++ /dev/null @@ -1,28 +0,0 @@ -MemTotal: 2053960 kB -MemFree: 157792 kB -Buffers: 209440 kB -Cached: 660788 kB -SwapCached: 76 kB -Active: 1416036 kB -Inactive: 178872 kB -SwapTotal: 2064376 kB -SwapFree: 2063940 kB -Dirty: 1736 kB -Writeback: 0 kB -AnonPages: 723984 kB -Mapped: 105208 kB -Slab: 225000 kB -SReclaimable: 172568 kB -SUnreclaim: 52432 kB -PageTables: 40224 kB -NFS_Unstable: 0 kB -Bounce: 0 kB -CommitLimit: 3091356 kB -Committed_AS: 1270588 kB -VmallocTotal: 34359738367 kB -VmallocUsed: 30640 kB -VmallocChunk: 34359705907 kB -HugePages_Total: 0 -HugePages_Free: 0 -HugePages_Rsvd: 0 -Hugepagesize: 2048 kB diff --git a/tests/nodeinfodata/linux-nodeinfo-1.txt b/tests/nodeinfodata/linux-nodeinfo-1.txt deleted file mode 100644 index 09e2946..0000000 --- a/tests/nodeinfodata/linux-nodeinfo-1.txt +++ /dev/null @@ -1 +0,0 @@ -CPUs: 2, MHz: 2800, Nodes: 1, Cores: 2 diff --git a/tests/nodeinfodata/linux-nodeinfo-2.cpuinfo b/tests/nodeinfodata/linux-nodeinfo-2.cpuinfo deleted file mode 100644 index 95d96e1..0000000 --- a/tests/nodeinfodata/linux-nodeinfo-2.cpuinfo +++ /dev/null @@ -1,47 +0,0 @@ -processor : 0 -vendor_id : AuthenticAMD -cpu family : 15 -model : 75 -model name : AMD Athlon(tm) 64 X2 Dual Core Processor 4200+ -stepping : 2 -cpu MHz : 2211.364 -cache size : 512 KB -physical id : 0 -siblings : 2 -core id : 0 -cpu cores : 2 -fpu : yes -fpu_exception : yes -cpuid level : 1 -wp : yes -flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm 3dnowext 3dnow pni cx16 lahf_lm cmp_legacy svm extapic cr8_legacy -bogomips : 4424.80 -TLB size : 1024 4K pages -clflush size : 64 -cache_alignment : 64 -address sizes : 40 bits physical, 48 bits virtual -power management: ts fid vid ttp tm stc - -processor : 1 -vendor_id : AuthenticAMD -cpu family : 15 -model : 75 -model name : AMD Athlon(tm) 64 X2 Dual Core Processor 4200+ -stepping : 2 -cpu MHz : 2211.364 -cache size : 512 KB -physical id : 0 -siblings : 2 -core id : 1 -cpu cores : 2 -fpu : yes -fpu_exception : yes -cpuid level : 1 -wp : yes -flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm 3dnowext 3dnow pni cx16 lahf_lm cmp_legacy svm extapic cr8_legacy -bogomips : 4422.14 -TLB size : 1024 4K pages -clflush size : 64 -cache_alignment : 64 -address sizes : 40 bits physical, 48 bits virtual -power management: ts fid vid ttp tm stc diff --git a/tests/nodeinfodata/linux-nodeinfo-2.meminfo b/tests/nodeinfodata/linux-nodeinfo-2.meminfo deleted file mode 100644 index e1d9b86..0000000 --- a/tests/nodeinfodata/linux-nodeinfo-2.meminfo +++ /dev/null @@ -1,28 +0,0 @@ -MemTotal: 4059540 kB -MemFree: 3525008 kB -Buffers: 24480 kB -Cached: 282300 kB -SwapCached: 0 kB -Active: 230980 kB -Inactive: 243276 kB -SwapTotal: 2031608 kB -SwapFree: 2031608 kB -Dirty: 200 kB -Writeback: 0 kB -AnonPages: 167376 kB -Mapped: 31204 kB -Slab: 34904 kB -SReclaimable: 15544 kB -SUnreclaim: 19360 kB -PageTables: 7704 kB -NFS_Unstable: 0 kB -Bounce: 0 kB -CommitLimit: 4061376 kB -Committed_AS: 265176 kB -VmallocTotal: 34359738367 kB -VmallocUsed: 1736 kB -VmallocChunk: 34359736147 kB -HugePages_Total: 0 -HugePages_Free: 0 -HugePages_Rsvd: 0 -Hugepagesize: 2048 kB diff --git a/tests/nodeinfodata/linux-nodeinfo-2.txt b/tests/nodeinfodata/linux-nodeinfo-2.txt deleted file mode 100644 index e4eea94..0000000 --- a/tests/nodeinfodata/linux-nodeinfo-2.txt +++ /dev/null @@ -1 +0,0 @@ -CPUs: 2, MHz: 2211, Nodes: 1, Cores: 2 diff --git a/tests/nodeinfodata/linux-nodeinfo-3.cpuinfo b/tests/nodeinfodata/linux-nodeinfo-3.cpuinfo deleted file mode 100644 index 94e3c01..0000000 --- a/tests/nodeinfodata/linux-nodeinfo-3.cpuinfo +++ /dev/null @@ -1,99 +0,0 @@ -processor : 0 -vendor_id : GenuineIntel -cpu family : 6 -model : 15 -model name : Intel(R) Xeon(R) CPU 5110 @ 1.60GHz -stepping : 6 -cpu MHz : 1595.925 -cache size : 4096 KB -physical id : 0 -siblings : 2 -core id : 0 -cpu cores : 2 -fpu : yes -fpu_exception : yes -cpuid level : 10 -wp : yes -flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov -pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall lm constant_tsc -pni monitor ds_cpl vmx tm2 ssse3 cx16 xtpr dca lahf_lm -bogomips : 3193.88 -clflush size : 64 -cache_alignment : 64 -address sizes : 36 bits physical, 48 bits virtual -power management: - -processor : 1 -vendor_id : GenuineIntel -cpu family : 6 -model : 15 -model name : Intel(R) Xeon(R) CPU 5110 @ 1.60GHz -stepping : 6 -cpu MHz : 1595.925 -cache size : 4096 KB -physical id : 3 -siblings : 2 -core id : 0 -cpu cores : 2 -fpu : yes -fpu_exception : yes -cpuid level : 10 -wp : yes -flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov -pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall lm constant_tsc -pni monitor ds_cpl vmx tm2 ssse3 cx16 xtpr dca lahf_lm -bogomips : 3191.89 -clflush size : 64 -cache_alignment : 64 -address sizes : 36 bits physical, 48 bits virtual -power management: - -processor : 2 -vendor_id : GenuineIntel -cpu family : 6 -model : 15 -model name : Intel(R) Xeon(R) CPU 5110 @ 1.60GHz -stepping : 6 -cpu MHz : 1595.925 -cache size : 4096 KB -physical id : 0 -siblings : 2 -core id : 1 -cpu cores : 2 -fpu : yes -fpu_exception : yes -cpuid level : 10 -wp : yes -flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov -pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall lm constant_tsc -pni monitor ds_cpl vmx tm2 ssse3 cx16 xtpr dca lahf_lm -bogomips : 3191.88 -clflush size : 64 -cache_alignment : 64 -address sizes : 36 bits physical, 48 bits virtual -power management: - -processor : 3 -vendor_id : GenuineIntel -cpu family : 6 -model : 15 -model name : Intel(R) Xeon(R) CPU 5110 @ 1.60GHz -stepping : 6 -cpu MHz : 1595.925 -cache size : 4096 KB -physical id : 3 -siblings : 2 -core id : 1 -cpu cores : 2 -fpu : yes -fpu_exception : yes -cpuid level : 10 -wp : yes -flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov -pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall lm constant_tsc -pni monitor ds_cpl vmx tm2 ssse3 cx16 xtpr dca lahf_lm -bogomips : 3191.87 -clflush size : 64 -cache_alignment : 64 -address sizes : 36 bits physical, 48 bits virtual -power management: diff --git a/tests/nodeinfodata/linux-nodeinfo-3.meminfo b/tests/nodeinfodata/linux-nodeinfo-3.meminfo deleted file mode 100644 index 6bb8f64..0000000 --- a/tests/nodeinfodata/linux-nodeinfo-3.meminfo +++ /dev/null @@ -1,28 +0,0 @@ -MemTotal: 4059272 kB -MemFree: 3532828 kB -Buffers: 16644 kB -Cached: 286152 kB -SwapCached: 0 kB -Active: 252032 kB -Inactive: 220148 kB -SwapTotal: 2031608 kB -SwapFree: 2031608 kB -Dirty: 76 kB -Writeback: 0 kB -AnonPages: 169548 kB -Mapped: 25456 kB -Slab: 27260 kB -SReclaimable: 9512 kB -SUnreclaim: 17748 kB -PageTables: 7552 kB -NFS_Unstable: 0 kB -Bounce: 0 kB -CommitLimit: 4061244 kB -Committed_AS: 278572 kB -VmallocTotal: 34359738367 kB -VmallocUsed: 2044 kB -VmallocChunk: 34359736107 kB -HugePages_Total: 0 -HugePages_Free: 0 -HugePages_Rsvd: 0 -Hugepagesize: 2048 kB diff --git a/tests/nodeinfodata/linux-nodeinfo-3.txt b/tests/nodeinfodata/linux-nodeinfo-3.txt deleted file mode 100644 index 17d4d8e..0000000 --- a/tests/nodeinfodata/linux-nodeinfo-3.txt +++ /dev/null @@ -1 +0,0 @@ -CPUs: 4, MHz: 1595, Nodes: 1, Cores: 2 diff --git a/tests/nodeinfodata/linux-nodeinfo-4.cpuinfo b/tests/nodeinfodata/linux-nodeinfo-4.cpuinfo deleted file mode 100644 index 535a29d..0000000 --- a/tests/nodeinfodata/linux-nodeinfo-4.cpuinfo +++ /dev/null @@ -1,95 +0,0 @@ -processor : 0 -vendor_id : AuthenticAMD -cpu family : 16 -model : 2 -model name : AMD Processor model unknown -stepping : 0 -cpu MHz : 1000.000 -cache size : 512 KB -physical id : 0 -siblings : 4 -core id : 0 -cpu cores : 4 -fpu : yes -fpu_exception : yes -cpuid level : 5 -wp : yes -flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy altmovcr8 abm sse4a misalignsse 3dnowprefetch osvw -bogomips : 4131.46 -TLB size : 1024 4K pages -clflush size : 64 -cache_alignment : 64 -address sizes : 48 bits physical, 48 bits virtual -power management: ts ttp tm stc 100mhzsteps hwpstate [8] - -processor : 1 -vendor_id : AuthenticAMD -cpu family : 16 -model : 2 -model name : AMD Processor model unknown -stepping : 0 -cpu MHz : 1000.000 -cache size : 512 KB -physical id : 0 -siblings : 4 -core id : 1 -cpu cores : 4 -fpu : yes -fpu_exception : yes -cpuid level : 5 -wp : yes -flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy altmovcr8 abm sse4a misalignsse 3dnowprefetch osvw -bogomips : 3200.13 -TLB size : 1024 4K pages -clflush size : 64 -cache_alignment : 64 -address sizes : 48 bits physical, 48 bits virtual -power management: ts ttp tm stc 100mhzsteps hwpstate [8] - -processor : 2 -vendor_id : AuthenticAMD -cpu family : 16 -model : 2 -model name : AMD Processor model unknown -stepping : 0 -cpu MHz : 1000.000 -cache size : 512 KB -physical id : 0 -siblings : 4 -core id : 2 -cpu cores : 4 -fpu : yes -fpu_exception : yes -cpuid level : 5 -wp : yes -flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy altmovcr8 abm sse4a misalignsse 3dnowprefetch osvw -bogomips : 3200.14 -TLB size : 1024 4K pages -clflush size : 64 -cache_alignment : 64 -address sizes : 48 bits physical, 48 bits virtual -power management: ts ttp tm stc 100mhzsteps hwpstate [8] - -processor : 3 -vendor_id : AuthenticAMD -cpu family : 16 -model : 2 -model name : AMD Processor model unknown -stepping : 0 -cpu MHz : 1000.000 -cache size : 512 KB -physical id : 0 -siblings : 4 -core id : 3 -cpu cores : 4 -fpu : yes -fpu_exception : yes -cpuid level : 5 -wp : yes -flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy altmovcr8 abm sse4a misalignsse 3dnowprefetch osvw -bogomips : 3200.01 -TLB size : 1024 4K pages -clflush size : 64 -cache_alignment : 64 -address sizes : 48 bits physical, 48 bits virtual -power management: ts ttp tm stc 100mhzsteps hwpstate [8] diff --git a/tests/nodeinfodata/linux-nodeinfo-4.meminfo b/tests/nodeinfodata/linux-nodeinfo-4.meminfo deleted file mode 100644 index 6bb8f64..0000000 --- a/tests/nodeinfodata/linux-nodeinfo-4.meminfo +++ /dev/null @@ -1,28 +0,0 @@ -MemTotal: 4059272 kB -MemFree: 3532828 kB -Buffers: 16644 kB -Cached: 286152 kB -SwapCached: 0 kB -Active: 252032 kB -Inactive: 220148 kB -SwapTotal: 2031608 kB -SwapFree: 2031608 kB -Dirty: 76 kB -Writeback: 0 kB -AnonPages: 169548 kB -Mapped: 25456 kB -Slab: 27260 kB -SReclaimable: 9512 kB -SUnreclaim: 17748 kB -PageTables: 7552 kB -NFS_Unstable: 0 kB -Bounce: 0 kB -CommitLimit: 4061244 kB -Committed_AS: 278572 kB -VmallocTotal: 34359738367 kB -VmallocUsed: 2044 kB -VmallocChunk: 34359736107 kB -HugePages_Total: 0 -HugePages_Free: 0 -HugePages_Rsvd: 0 -Hugepagesize: 2048 kB diff --git a/tests/nodeinfodata/linux-nodeinfo-4.txt b/tests/nodeinfodata/linux-nodeinfo-4.txt deleted file mode 100644 index 5a5c919..0000000 --- a/tests/nodeinfodata/linux-nodeinfo-4.txt +++ /dev/null @@ -1 +0,0 @@ -CPUs: 4, MHz: 1000, Nodes: 1, Cores: 4 diff --git a/tests/nodeinfodata/linux-nodeinfo-5.cpuinfo b/tests/nodeinfodata/linux-nodeinfo-5.cpuinfo deleted file mode 100644 index 7cb6e18..0000000 --- a/tests/nodeinfodata/linux-nodeinfo-5.cpuinfo +++ /dev/null @@ -1,95 +0,0 @@ -processor : 0 -vendor_id : AuthenticAMD -cpu family : 15 -model : 65 -model name : Dual-Core AMD Opteron(tm) Processor 2220 -stepping : 3 -cpu MHz : 2814.921 -cache size : 1024 KB -physical id : 0 -siblings : 2 -core id : 0 -cpu cores : 2 -fpu : yes -fpu_exception : yes -cpuid level : 1 -wp : yes -flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm 3dnowext 3dnow pni cx16 lahf_lm cmp_legacy svm extapic cr8_legacy -bogomips : 5633.58 -TLB size : 1024 4K pages -clflush size : 64 -cache_alignment : 64 -address sizes : 40 bits physical, 48 bits virtual -power management: ts fid vid ttp tm stc - -processor : 1 -vendor_id : AuthenticAMD -cpu family : 15 -model : 65 -model name : Dual-Core AMD Opteron(tm) Processor 2220 -stepping : 3 -cpu MHz : 2814.921 -cache size : 1024 KB -physical id : 0 -siblings : 2 -core id : 1 -cpu cores : 2 -fpu : yes -fpu_exception : yes -cpuid level : 1 -wp : yes -flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm 3dnowext 3dnow pni cx16 lahf_lm cmp_legacy svm extapic cr8_legacy -bogomips : 5629.01 -TLB size : 1024 4K pages -clflush size : 64 -cache_alignment : 64 -address sizes : 40 bits physical, 48 bits virtual -power management: ts fid vid ttp tm stc - -processor : 2 -vendor_id : AuthenticAMD -cpu family : 15 -model : 65 -model name : Dual-Core AMD Opteron(tm) Processor 2220 -stepping : 3 -cpu MHz : 2814.921 -cache size : 1024 KB -physical id : 1 -siblings : 2 -core id : 0 -cpu cores : 2 -fpu : yes -fpu_exception : yes -cpuid level : 1 -wp : yes -flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm 3dnowext 3dnow pni cx16 lahf_lm cmp_legacy svm extapic cr8_legacy -bogomips : 5628.94 -TLB size : 1024 4K pages -clflush size : 64 -cache_alignment : 64 -address sizes : 40 bits physical, 48 bits virtual -power management: ts fid vid ttp tm stc - -processor : 3 -vendor_id : AuthenticAMD -cpu family : 15 -model : 65 -model name : Dual-Core AMD Opteron(tm) Processor 2220 -stepping : 3 -cpu MHz : 2814.921 -cache size : 1024 KB -physical id : 1 -siblings : 2 -core id : 1 -cpu cores : 2 -fpu : yes -fpu_exception : yes -cpuid level : 1 -wp : yes -flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm 3dnowext 3dnow pni cx16 lahf_lm cmp_legacy svm extapic cr8_legacy -bogomips : 5628.86 -TLB size : 1024 4K pages -clflush size : 64 -cache_alignment : 64 -address sizes : 40 bits physical, 48 bits virtual -power management: ts fid vid ttp tm stc diff --git a/tests/nodeinfodata/linux-nodeinfo-5.meminfo b/tests/nodeinfodata/linux-nodeinfo-5.meminfo deleted file mode 100644 index 6bb8f64..0000000 --- a/tests/nodeinfodata/linux-nodeinfo-5.meminfo +++ /dev/null @@ -1,28 +0,0 @@ -MemTotal: 4059272 kB -MemFree: 3532828 kB -Buffers: 16644 kB -Cached: 286152 kB -SwapCached: 0 kB -Active: 252032 kB -Inactive: 220148 kB -SwapTotal: 2031608 kB -SwapFree: 2031608 kB -Dirty: 76 kB -Writeback: 0 kB -AnonPages: 169548 kB -Mapped: 25456 kB -Slab: 27260 kB -SReclaimable: 9512 kB -SUnreclaim: 17748 kB -PageTables: 7552 kB -NFS_Unstable: 0 kB -Bounce: 0 kB -CommitLimit: 4061244 kB -Committed_AS: 278572 kB -VmallocTotal: 34359738367 kB -VmallocUsed: 2044 kB -VmallocChunk: 34359736107 kB -HugePages_Total: 0 -HugePages_Free: 0 -HugePages_Rsvd: 0 -Hugepagesize: 2048 kB diff --git a/tests/nodeinfodata/linux-nodeinfo-5.txt b/tests/nodeinfodata/linux-nodeinfo-5.txt deleted file mode 100644 index 54abb5d..0000000 --- a/tests/nodeinfodata/linux-nodeinfo-5.txt +++ /dev/null @@ -1 +0,0 @@ -CPUs: 4, MHz: 2814, Nodes: 1, Cores: 2 diff --git a/tests/nodeinfodata/linux-nodeinfo-6.cpuinfo b/tests/nodeinfodata/linux-nodeinfo-6.cpuinfo deleted file mode 100644 index a08cf26..0000000 --- a/tests/nodeinfodata/linux-nodeinfo-6.cpuinfo +++ /dev/null @@ -1,95 +0,0 @@ -processor : 0 -vendor_id : AuthenticAMD -cpu family : 15 -model : 65 -model name : Dual-Core AMD Opteron(tm) Processor 2218 -stepping : 2 -cpu MHz : 1000.000 -cache size : 1024 KB -physical id : 0 -siblings : 2 -core id : 0 -cpu cores : 2 -fpu : yes -fpu_exception : yes -cpuid level : 1 -wp : yes -flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm 3dnowext 3dnow pni cx16 lahf_lm cmp_legacy svm cr8_legacy -bogomips : 1999.99 -TLB size : 1024 4K pages -clflush size : 64 -cache_alignment : 64 -address sizes : 40 bits physical, 48 bits virtual -power management: ts fid vid ttp tm stc - -processor : 1 -vendor_id : AuthenticAMD -cpu family : 15 -model : 65 -model name : Dual-Core AMD Opteron(tm) Processor 2218 -stepping : 2 -cpu MHz : 1000.000 -cache size : 1024 KB -physical id : 1 -siblings : 2 -core id : 0 -cpu cores : 2 -fpu : yes -fpu_exception : yes -cpuid level : 1 -wp : yes -flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm 3dnowext 3dnow pni cx16 lahf_lm cmp_legacy svm cr8_legacy -bogomips : 1999.99 -TLB size : 1024 4K pages -clflush size : 64 -cache_alignment : 64 -address sizes : 40 bits physical, 48 bits virtual -power management: ts fid vid ttp tm stc - -processor : 2 -vendor_id : AuthenticAMD -cpu family : 15 -model : 65 -model name : Dual-Core AMD Opteron(tm) Processor 2218 -stepping : 2 -cpu MHz : 1000.000 -cache size : 1024 KB -physical id : 0 -siblings : 2 -core id : 1 -cpu cores : 2 -fpu : yes -fpu_exception : yes -cpuid level : 1 -wp : yes -flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm 3dnowext 3dnow pni cx16 lahf_lm cmp_legacy svm cr8_legacy -bogomips : 1999.99 -TLB size : 1024 4K pages -clflush size : 64 -cache_alignment : 64 -address sizes : 40 bits physical, 48 bits virtual -power management: ts fid vid ttp tm stc - -processor : 3 -vendor_id : AuthenticAMD -cpu family : 15 -model : 65 -model name : Dual-Core AMD Opteron(tm) Processor 2218 -stepping : 2 -cpu MHz : 1000.000 -cache size : 1024 KB -physical id : 1 -siblings : 2 -core id : 1 -cpu cores : 2 -fpu : yes -fpu_exception : yes -cpuid level : 1 -wp : yes -flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm 3dnowext 3dnow pni cx16 lahf_lm cmp_legacy svm cr8_legacy -bogomips : 1999.99 -TLB size : 1024 4K pages -clflush size : 64 -cache_alignment : 64 -address sizes : 40 bits physical, 48 bits virtual -power management: ts fid vid ttp tm stc diff --git a/tests/nodeinfodata/linux-nodeinfo-6.meminfo b/tests/nodeinfodata/linux-nodeinfo-6.meminfo deleted file mode 100644 index 6bb8f64..0000000 --- a/tests/nodeinfodata/linux-nodeinfo-6.meminfo +++ /dev/null @@ -1,28 +0,0 @@ -MemTotal: 4059272 kB -MemFree: 3532828 kB -Buffers: 16644 kB -Cached: 286152 kB -SwapCached: 0 kB -Active: 252032 kB -Inactive: 220148 kB -SwapTotal: 2031608 kB -SwapFree: 2031608 kB -Dirty: 76 kB -Writeback: 0 kB -AnonPages: 169548 kB -Mapped: 25456 kB -Slab: 27260 kB -SReclaimable: 9512 kB -SUnreclaim: 17748 kB -PageTables: 7552 kB -NFS_Unstable: 0 kB -Bounce: 0 kB -CommitLimit: 4061244 kB -Committed_AS: 278572 kB -VmallocTotal: 34359738367 kB -VmallocUsed: 2044 kB -VmallocChunk: 34359736107 kB -HugePages_Total: 0 -HugePages_Free: 0 -HugePages_Rsvd: 0 -Hugepagesize: 2048 kB diff --git a/tests/nodeinfodata/linux-nodeinfo-6.txt b/tests/nodeinfodata/linux-nodeinfo-6.txt deleted file mode 100644 index f89e35e..0000000 --- a/tests/nodeinfodata/linux-nodeinfo-6.txt +++ /dev/null @@ -1 +0,0 @@ -CPUs: 4, MHz: 1000, Nodes: 1, Cores: 2 diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1-cpu-output.txt b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1-cpu-output.txt new file mode 100644 index 0000000..09e2946 --- /dev/null +++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1-cpu-output.txt @@ -0,0 +1 @@ +CPUs: 2, MHz: 2800, Nodes: 1, Cores: 2 diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1.cpuinfo b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1.cpuinfo new file mode 100644 index 0000000..e88a48f --- /dev/null +++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1.cpuinfo @@ -0,0 +1,45 @@ +processor : 0 +vendor_id : GenuineIntel +cpu family : 15 +model : 4 +model name : Intel(R) Xeon(TM) CPU 2.80GHz +stepping : 8 +cpu MHz : 2800.000 +cache size : 2048 KB +physical id : 0 +siblings : 2 +core id : 0 +cpu cores : 2 +fpu : yes +fpu_exception : yes +cpuid level : 5 +wp : yes +flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx lm constant_tsc pni monitor ds_cpl est cid cx16 xtpr lahf_lm +bogomips : 5590.67 +clflush size : 64 +cache_alignment : 128 +address sizes : 36 bits physical, 48 bits virtual +power management: + +processor : 1 +vendor_id : GenuineIntel +cpu family : 15 +model : 4 +model name : Intel(R) Xeon(TM) CPU 2.80GHz +stepping : 8 +cpu MHz : 2800.000 +cache size : 2048 KB +physical id : 0 +siblings : 2 +core id : 1 +cpu cores : 2 +fpu : yes +fpu_exception : yes +cpuid level : 5 +wp : yes +flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx lm constant_tsc pni monitor ds_cpl est cid cx16 xtpr lahf_lm +bogomips : 5586.49 +clflush size : 64 +cache_alignment : 128 +address sizes : 36 bits physical, 48 bits virtual +power management: diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu0/online b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu0/online new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu0/online @@ -0,0 +1 @@ +1 diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu0/topology/core_id b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu0/topology/core_id
new file mode 100644 index 0000000..573541a --- /dev/null +++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu0/topology/core_id
@@ -0,0 +1 @@ +0 diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu0/topology/core_siblings b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu0/topology/core_siblings
new file mode 100644 index 0000000..b9ad9ed --- /dev/null +++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu0/topology/core_siblings
@@ -0,0 +1 @@ +00000003 diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu0/topology/core_siblings_list b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu0/topology/core_siblings_list
new file mode 100644 index 0000000..8b0fab8 --- /dev/null +++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu0/topology/core_siblings_list
@@ -0,0 +1 @@ +0-1 diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu0/topology/physical_package_id b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu0/topology/physical_package_id
new file mode 100644 index 0000000..573541a --- /dev/null +++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu0/topology/physical_package_id
@@ -0,0 +1 @@ +0 diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu0/topology/thread_siblings b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu0/topology/thread_siblings
new file mode 100644 index 0000000..d347603 --- /dev/null +++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu0/topology/thread_siblings
@@ -0,0 +1 @@ +00000001 diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu0/topology/thread_siblings_list b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu0/topology/thread_siblings_list
new file mode 100644 index 0000000..573541a --- /dev/null +++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu0/topology/thread_siblings_list
@@ -0,0 +1 @@ +0 diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/core_id b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/core_id new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/core_id @@ -0,0 +1 @@ +1 diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/core_siblings b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/core_siblings
new file mode 100644 index 0000000..b9ad9ed --- /dev/null +++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/core_siblings @@ -0,0 +1 @@ +00000003 diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/core_siblings_list b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/core_siblings_list
new file mode 100644 index 0000000..8b0fab8 --- /dev/null +++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/core_siblings_list
@@ -0,0 +1 @@ +0-1 diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/online b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/online new file mode 100644 index 0000000..573541a --- /dev/null +++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/online @@ -0,0 +1 @@ +0 diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/physical_package_id b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/physical_package_id
new file mode 100644 index 0000000..573541a --- /dev/null +++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/physical_package_id
@@ -0,0 +1 @@ +0 diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/thread_siblings b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/thread_siblings new file mode 100644 index 0000000..0af11c5 --- /dev/null +++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/thread_siblings @@ -0,0 +1 @@ +00000002 diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/thread_siblings_list b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/thread_siblings_list
new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/thread_siblings_list
@@ -0,0 +1 @@ +1 diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/topology/core_id b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/topology/core_id
new file mode 100644 index 0000000..573541a --- /dev/null +++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/topology/core_id
@@ -0,0 +1 @@ +0 diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/topology/core_siblings b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/topology/core_siblings
new file mode 100644 index 0000000..b9ad9ed --- /dev/null +++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/topology/core_siblings
@@ -0,0 +1 @@ +00000003 diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/topology/core_siblings_list b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/topology/core_siblings_list
new file mode 100644 index 0000000..8b0fab8 --- /dev/null +++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/topology/core_siblings_list
@@ -0,0 +1 @@ +0-1 diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/topology/physical_package_id b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/topology/physical_package_id
new file mode 100644 index 0000000..573541a --- /dev/null +++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/topology/physical_package_id
@@ -0,0 +1 @@ +0 diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/topology/thread_siblings b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/topology/thread_siblings
new file mode 100644 index 0000000..d347603 --- /dev/null +++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/topology/thread_siblings
@@ -0,0 +1 @@ +00000001 diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/topology/thread_siblings_list b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/topology/thread_siblings_list
new file mode 100644 index 0000000..573541a --- /dev/null +++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/cpu/cpu1/topology/thread_siblings_list
@@ -0,0 +1 @@ +0 diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/node/node0/meminfo b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/node/node0/meminfo new file mode 100644 index 0000000..ad2286a --- /dev/null +++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/node/node0/meminfo @@ -0,0 +1,28 @@ +Node 0 MemTotal: 33554432 kB +Node 0 MemFree: 12351744 kB +Node 0 MemUsed: 21202688 kB +Node 0 Active: 2086528 kB +Node 0 Inactive: 1816512 kB +Node 0 Active(anon): 174208 kB +Node 0 Inactive(anon): 3840 kB +Node 0 Active(file): 1912320 kB +Node 0 Inactive(file): 1812672 kB +Node 0 Unevictable: 0 kB +Node 0 Mlocked: 0 kB +Node 0 Dirty: 0 kB +Node 0 Writeback: 0 kB +Node 0 FilePages: 3758976 kB +Node 0 Mapped: 13440 kB +Node 0 AnonPages: 160704 kB +Node 0 Shmem: 17664 kB +Node 0 KernelStack: 2944 kB +Node 0 PageTables: 12032 kB +Node 0 NFS_Unstable: 0 kB +Node 0 Bounce: 0 kB +Node 0 WritebackTmp: 0 kB +Node 0 Slab: 315904 kB +Node 0 SReclaimable: 197824 kB +Node 0 SUnreclaim: 118080 kB +Node 0 HugePages_Total: 1024 +Node 0 HugePages_Free: 768 +Node 0 HugePages_Surp: 0 diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/node/node1/meminfo b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/node/node1/meminfo new file mode 100644 index 0000000..7666eb6 --- /dev/null +++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-1/node/node1/meminfo @@ -0,0 +1,28 @@ +Node 1 MemTotal: 33554432 kB +Node 1 MemFree: 11934016 kB +Node 1 MemUsed: 21620416 kB +Node 1 Active: 3225728 kB +Node 1 Inactive: 1057536 kB +Node 1 Active(anon): 154752 kB +Node 1 Inactive(anon): 80320 kB +Node 1 Active(file): 3070976 kB +Node 1 Inactive(file): 977216 kB +Node 1 Unevictable: 0 kB +Node 1 Mlocked: 0 kB +Node 1 Dirty: 192 kB +Node 1 Writeback: 0 kB +Node 1 FilePages: 4165696 kB +Node 1 Mapped: 36416 kB +Node 1 AnonPages: 117248 kB +Node 1 Shmem: 117760 kB +Node 1 KernelStack: 2144 kB +Node 1 PageTables: 10368 kB +Node 1 NFS_Unstable: 0 kB +Node 1 Bounce: 0 kB +Node 1 WritebackTmp: 0 kB +Node 1 Slab: 277888 kB +Node 1 SReclaimable: 175744 kB +Node 1 SUnreclaim: 102144 kB +Node 1 HugePages_Total: 1024 +Node 1 HugePages_Free: 1024 +Node 1 HugePages_Surp: 0 diff --git a/tests/nodeinfotest.c b/tests/nodeinfotest.c index 448e072..f227dc5 100644 --- a/tests/nodeinfotest.c +++ b/tests/nodeinfotest.c @@ -13,6 +13,7 @@
#if ! (defined __linux__&& (defined(__x86_64__) || \ defined(__amd64__) || \ + defined(__ppc64__) || \ defined(__i386__)))
int
Now that I also applied this on a ppc64 machine: is __ppc64__ really available on your machine? I only have __PPC64__ or __powerpc64__ defined. However, once I put __powerpc64__ into the list and thus activate the test on ppc64 I get this error:
Sorry, typo ! I'll fix this.
TEST: nodeinfotest Expect 39 'CPUs: 2, MHz: 2800, Nodes: 1, Cores: 2 ' Actual 36 'CPUs: 2, MHz: 0, Nodes: 1, Cores: 2 ' ! 1 FAIL
This time it's a regression in the CPU frequency. So probably you don't want to mention anything about PPC64 there since the format that linuxNodeInfoCPUPopulate() parses is still from the procfs and arch-dependent *OR* you add a ppc64-specific proc file that you only read on a ppc64 host. The latter may be better since it doesn't skip the test then.
Agree. It is not right to add ppc here, since CPU frequency is still read off /proc/cpuinfo, and the test file I've added is a sample of an x86-based /proc/cpuinfo. Let me augment this test with another /proc/cpuinfo file for PowerPC, and this should be fixed. I'll send out an updated test soon. -- Prerna Saxena Linux Technology Centre, IBM Systems and Technology Lab, Bangalore, India

From: Prerna Saxena <prerna@linux.vnet.ibm.com> Date: Mon, 3 Oct 2011 06:01:33 -0700 Subject: [PATCH 3/5] Add support for ppc64 qemu This enables libvirt to select the correct qemu binary (qemu-system-ppc64) for a guest vm based on arch 'ppc64'. Also, libvirt is enabled to correctly parse the list of supported PowerPC CPUs, generated by running 'qemu-system-ppc64 -cpu ?' Completed cleanups suggested by Daniel and Stefan. Signed-off-by: Prerna Saxena <prerna@linux.vnet.ibm.com> --- src/qemu/qemu_capabilities.c | 74 ++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 74 insertions(+), 0 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index deef0ea..7b56b13 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -186,6 +186,7 @@ static const struct qemu_arch_info const arch_info_hvm[] = { { "mipsel", 32, NULL, "qemu-system-mipsel", NULL, NULL, 0 }, { "sparc", 32, NULL, "qemu-system-sparc", NULL, NULL, 0 }, { "ppc", 32, NULL, "qemu-system-ppc", NULL, NULL, 0 }, + { "ppc64", 64, NULL, "qemu-system-ppc64", NULL, NULL, 0 }, { "itanium", 64, NULL, "qemu-system-ia64", NULL, NULL, 0 }, { "s390x", 64, NULL, "qemu-system-s390x", NULL, NULL, 0 }, }; @@ -478,6 +479,77 @@ error: return -1; } +/* ppc64 parser. + * Format : PowerPC <machine> <description> + */ +static int +qemuCapsParsePPCModels(const char *output, + unsigned int *retcount, + const char ***retcpus) +{ + const char *p = output; + const char *next; + unsigned int count = 0; + const char **cpus = NULL; + int i; + + if (!retcpus) { + VIR_DEBUG("No retcpus specified"); + return -1; + } + + do { + const char *t; + + if ((next = strchr(p, '\n'))) + next++; + + if (!STRPREFIX(p, "PowerPC ")) + continue; + + /* Skip the preceding sub-string "PowerPC " */ + p += 8; + + /*Malformed string, does not obey the format 'PowerPC <model> <desc>'*/ + if (!(t = strchr(p, ' ')) || (next && t >= next)) + continue; + + if (*p == '\0') + break; + + if (*p == '\n') + continue; + + if (retcpus) { + unsigned int len; + + if (VIR_REALLOC_N(cpus, count + 1) < 0) + virReportOOMError(); + goto error; + + len = t - p - 1; + + if (!(cpus[count] = strndup(p, len))) + virReportOOMError(); + goto error; + } + count++; + } while ((p = next)); + + if (retcount) + *retcount = count; + if (retcpus) + *retcpus = cpus; + return 0; + +error: + if (cpus) { + for (i = 0; i < count; i++) + VIR_FREE(cpus[i]); + } + VIR_FREE(cpus); + return -1; +} int qemuCapsProbeCPUModels(const char *qemu, @@ -498,6 +570,8 @@ qemuCapsProbeCPUModels(const char *qemu, if (STREQ(arch, "i686") || STREQ(arch, "x86_64")) parse = qemuCapsParseX86Models; + else if (STREQ(arch, "ppc64")) + parse = qemuCapsParsePPCModels; else { VIR_DEBUG("don't know how to parse %s CPU models", arch); return 0; -- 1.7.3.4 -- Prerna Saxena Linux Technology Centre, IBM Systems and Technology Lab, Bangalore, India

On 12/01/2011 01:05 PM, Prerna Saxena wrote:
From: Prerna Saxena<prerna@linux.vnet.ibm.com> Date: Mon, 3 Oct 2011 06:01:33 -0700 Subject: [PATCH 3/5] Add support for ppc64 qemu
This enables libvirt to select the correct qemu binary (qemu-system-ppc64) for a guest vm based on arch 'ppc64'. Also, libvirt is enabled to correctly parse the list of supported PowerPC CPUs, generated by running 'qemu-system-ppc64 -cpu ?'
Completed cleanups suggested by Daniel and Stefan.
Signed-off-by: Prerna Saxena<prerna@linux.vnet.ibm.com> ---
ACK

From: Prerna Saxena <prerna@linux.vnet.ibm.com> Date: Mon, 21 Nov 2011 18:20:42 +0530 Subject: [PATCH 4/5] Clean up qemuBuildCommandLine to remove x86- specific assumptions from generic code. This implements the minimal set of changes needed in libvirt to launch a PowerPC-KVM based guest. It removes x86-specific assumptions about choice of serial driver backend from generic qemu guest commandline generation code. It also restricts the ACPI capability to be available for an x86 or x86_64 domain. This is not a complete solution -- it still does not guarantee libvirt the capability to flag non-supported options in guest XML. (Eg, an ACPI specification in a PowerPC guest XML will still get processed, even though qemu-system-ppc64 does not support it while qemu-system-x86_64 does.) This drawback exists because libvirt falls back on qemu to query supported features, and qemu '-h' blindly lists all capabilities -- irrespective of whether they are available while emulating a given architecture or not. The long-term solution would be for qemu to list out capabilities based on architecture and platform -- so that libvirt can cleanly make out what devices are supported on an arch (say 'ppc64') and platform (say, 'mac99'). Signed-off-by: Prerna Saxena <prerna@linux.vnet.ibm.com> --- src/qemu/qemu_command.c | 41 +++++++++++++++++++++++++++++++++++++---- src/qemu/qemu_command.h | 6 ++++++ 2 files changed, 43 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 507908e..1b8840a 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -4591,8 +4591,11 @@ qemuBuildCommandLine(virConnectPtr conn, VIR_FREE(devstr); virCommandAddArg(cmd, "-device"); - virCommandAddArgFormat(cmd, "isa-serial,chardev=char%s,id=%s", - serial->info.alias, serial->info.alias); + if (!(devstr = qemuBuildChrDeviceStr(serial, def->os.arch, + def->os.machine))) + goto error; + virCommandAddArg(cmd, devstr); + VIR_FREE(devstr); } else { virCommandAddArg(cmd, "-serial"); if (!(devstr = qemuBuildChrArgStr(&serial->source, NULL))) @@ -5479,6 +5482,34 @@ qemuBuildCommandLine(virConnectPtr conn, return NULL; } +/* This function generates the correct '-device' string for character + * devices of each architecture. + */ +char * +qemuBuildChrDeviceStr(virDomainChrDefPtr serial, + char *os_arch, + char *machine) +{ + virBuffer cmd = VIR_BUFFER_INITIALIZER; + + if (STREQ(os_arch, "ppc64") && STREQ(machine, "pseries")) + virBufferAsprintf(&cmd, "spapr-vty,chardev=char%s", + serial->info.alias); + else + virBufferAsprintf(&cmd, "isa-serial,chardev=char%s,id=%s", + serial->info.alias, serial->info.alias); + + if (virBufferError(&cmd)) { + virReportOOMError(); + goto error; + } + + return virBufferContentAndReset(&cmd); + + error: + virBufferFreeAndReset(&cmd); + return NULL; +} /* * This method takes a string representing a QEMU command line ARGV set @@ -6690,8 +6721,7 @@ virDomainDefPtr qemuParseCommandLine(virCapsPtr caps, def->maxvcpus = 1; def->vcpus = 1; def->clock.offset = VIR_DOMAIN_CLOCK_OFFSET_UTC; - def->features = (1 << VIR_DOMAIN_FEATURE_ACPI) - /*| (1 << VIR_DOMAIN_FEATURE_APIC)*/; + def->onReboot = VIR_DOMAIN_LIFECYCLE_RESTART; def->onCrash = VIR_DOMAIN_LIFECYCLE_DESTROY; def->onPoweroff = VIR_DOMAIN_LIFECYCLE_DESTROY; @@ -6726,6 +6756,9 @@ virDomainDefPtr qemuParseCommandLine(virCapsPtr caps, if (!def->os.arch) goto no_memory; + if (STREQ(def->os.arch, "i686")||STREQ(def->os.arch, "x86_64")) + def->features = (1 << VIR_DOMAIN_FEATURE_ACPI) + /*| (1 << VIR_DOMAIN_FEATURE_APIC)*/; #define WANT_VALUE() \ const char *val = progargv[++i]; \ if (!val) { \ diff --git a/src/qemu/qemu_command.h b/src/qemu/qemu_command.h index b680295..3978b2b 100644 --- a/src/qemu/qemu_command.h +++ b/src/qemu/qemu_command.h @@ -53,6 +53,12 @@ virCommandPtr qemuBuildCommandLine(virConnectPtr conn, enum virNetDevVPortProfileOp vmop) ATTRIBUTE_NONNULL(1); +/* Generate string for arch-specific '-device' parameter */ +char * +qemuBuildChrDeviceStr (virDomainChrDefPtr serial, + char *os_arch, + char *machine); + /* With vlan == -1, use netdev syntax, else old hostnet */ char * qemuBuildHostNetStr(virDomainNetDefPtr net, char type_sep, -- 1.7.3.4 -- Prerna Saxena Linux Technology Centre, IBM Systems and Technology Lab, Bangalore, India

On 12/01/2011 01:06 PM, Prerna Saxena wrote:
From: Prerna Saxena<prerna@linux.vnet.ibm.com> Date: Mon, 21 Nov 2011 18:20:42 +0530 Subject: [PATCH 4/5] Clean up qemuBuildCommandLine to remove x86- specific assumptions from generic code.
This implements the minimal set of changes needed in libvirt to launch a PowerPC-KVM based guest. It removes x86-specific assumptions about choice of serial driver backend from generic qemu guest commandline generation code. It also restricts the ACPI capability to be available for an x86 or x86_64 domain. This is not a complete solution -- it still does not guarantee libvirt the capability to flag non-supported options in guest XML. (Eg, an ACPI specification in a PowerPC guest XML will still get processed, even though qemu-system-ppc64 does not support it while qemu-system-x86_64 does.) This drawback exists because libvirt falls back on qemu to query supported features, and qemu '-h' blindly lists all capabilities -- irrespective of whether they are available while emulating a given architecture or not. The long-term solution would be for qemu to list out capabilities based on architecture and platform -- so that libvirt can cleanly make out what devices are supported on an arch (say 'ppc64') and platform (say, 'mac99').
Signed-off-by: Prerna Saxena<prerna@linux.vnet.ibm.com> diff --git a/src/qemu/qemu_command.h b/src/qemu/qemu_command.h index b680295..3978b2b 100644 --- a/src/qemu/qemu_command.h +++ b/src/qemu/qemu_command.h @@ -53,6 +53,12 @@ virCommandPtr qemuBuildCommandLine(virConnectPtr conn, enum virNetDevVPortProfileOp vmop) ATTRIBUTE_NONNULL(1);
+/* Generate string for arch-specific '-device' parameter */ +char * +qemuBuildChrDeviceStr (virDomainChrDefPtr serial, + char *os_arch, + char *machine); +
The nit here would be to remove that space.
/* With vlan == -1, use netdev syntax, else old hostnet */ char * qemuBuildHostNetStr(virDomainNetDefPtr net, char type_sep,
ACK

From: Bharata B Rao <bharata@linux.vnet.ibm.com> Date: Thu, 1 Dec 2011 21:21:34 +0530 Subject: [PATCH 5/5] Add ppc64 specific definitions to domain.rng ppc64 as new arch type and pseries as new machine type are added under <os> ... </os>. New address type spapr-vio is added. Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com> Signed-off-by: Prerna Saxena <prerna@linux.vnet.ibm.com> --- docs/schemas/domaincommon.rng | 35 +++++++++++++++++++++++++++++++++++ 1 files changed, 35 insertions(+), 0 deletions(-) diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index 22bbd46..6eb9b2f 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -192,6 +192,7 @@ <ref name="hvmmips"/> <ref name="hvmsparc"/> <ref name="hvmppc"/> + <ref name="hvmppc64"/> </choice> </optional> <value>hvm</value> @@ -262,6 +263,22 @@ </optional> </group> </define> + <define name="hvmppc64"> + <group> + <optional> + <attribute name="arch"> + <value>ppc64</value> + </attribute> + </optional> + <optional> + <attribute name="machine"> + <choice> + <value>pseries</value> + </choice> + </attribute> + </optional> + </group> + </define> <define name="osexe"> <element name="os"> <element name="type"> @@ -2178,6 +2195,13 @@ <ref name="usbPort"/> </attribute> </define> + <define name="spaprvioaddress"> + <optional> + <attribute name="reg"> + <ref name="spaprvioReg"/> + </attribute> + </optional> + </define> <define name="pciaddress"> <optional> <attribute name="domain"> @@ -2556,6 +2580,12 @@ </attribute> <ref name="usbportaddress"/> </group> + <group> + <attribute name="type"> + <value>spapr-vio</value> + </attribute> + <ref name="spaprvioaddress"/> + </group> </choice> </element> </define> @@ -2845,4 +2875,9 @@ <param name="pattern">[a-zA-Z0-9_\.:]+</param> </data> </define> + <define name="spaprvioReg"> + <data type="string"> + <param name="pattern">(0x)?[0-9a-fA-F]+</param> + </data> + </define> </grammar> -- 1.7.3.4 -- Prerna Saxena Linux Technology Centre, IBM Systems and Technology Lab, Bangalore, India

On 12/01/2011 01:08 PM, Prerna Saxena wrote:
From: Bharata B Rao<bharata@linux.vnet.ibm.com> Date: Thu, 1 Dec 2011 21:21:34 +0530 Subject: [PATCH 5/5] Add ppc64 specific definitions to domain.rng
ppc64 as new arch type and pseries as new machine type are added under<os> ...</os>. New address type spapr-vio is added.
Signed-off-by: Bharata B Rao<bharata@linux.vnet.ibm.com> Signed-off-by: Prerna Saxena<prerna@linux.vnet.ibm.com> ---
ACK. Test case(s) for the test/qemuxml2argvtest{.c} would be nice, too. I'll look for Daniel or Eric to let me know whether this will go into 0.9.8 or we should delay this. Stefan

On Thu, Dec 01, 2011 at 01:47:47PM -0500, Stefan Berger wrote:
On 12/01/2011 01:08 PM, Prerna Saxena wrote:
From: Bharata B Rao<bharata@linux.vnet.ibm.com> Date: Thu, 1 Dec 2011 21:21:34 +0530 Subject: [PATCH 5/5] Add ppc64 specific definitions to domain.rng
ppc64 as new arch type and pseries as new machine type are added under<os> ...</os>. New address type spapr-vio is added.
Signed-off-by: Bharata B Rao<bharata@linux.vnet.ibm.com> Signed-off-by: Prerna Saxena<prerna@linux.vnet.ibm.com> ---
ACK. Test case(s) for the test/qemuxml2argvtest{.c} would be nice, too.
I am working on the testcase, will send it shortly. Regards, Bharata.
participants (3)
-
Bharata B Rao
-
Prerna Saxena
-
Stefan Berger