Modify the tests/nodeinfotest.c to use sysfs in addition

to proc/cpuinfo

This patch creates a new sysfs hierarchy under
tests/nodeinfodata/linux-nodeinfo-sysfs-test-1.
Output files and /proc/cpuinfo files are also respectively added for
both x86 and ppc64.

Signed-off-by: Prerna Saxena <prerna@linux.vnet.ibm.com>
This commit is contained in:
Prerna Saxena 2011-12-01 12:47:52 +05:30 committed by Stefan Berger
parent f99b3b4b50
commit 82ff25e108
43 changed files with 113 additions and 618 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -1 +0,0 @@
CPUs: 2, MHz: 2211, Nodes: 1, Cores: 2

View File

@ -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:

View File

@ -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

View File

@ -1 +0,0 @@
CPUs: 4, MHz: 1595, Nodes: 1, Cores: 2

View File

@ -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]

View File

@ -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

View File

@ -1 +0,0 @@
CPUs: 4, MHz: 1000, Nodes: 1, Cores: 4

View File

@ -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

View File

@ -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

View File

@ -1 +0,0 @@
CPUs: 4, MHz: 2814, Nodes: 1, Cores: 2

View File

@ -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

View File

@ -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

View File

@ -1 +0,0 @@
CPUs: 4, MHz: 1000, Nodes: 1, Cores: 2

View File

@ -0,0 +1 @@
CPUs: 2, MHz: 8, Nodes: 1, Cores: 2

View File

@ -0,0 +1,9 @@
processor : 0
cpu : POWER7 (raw), altivec supported
clock : 8.388608MHz
revision : 2.3 (pvr 003f 0203)
processor : 1
cpu : POWER7 (raw), altivec supported
clock : 8.388608MHz
revision : 2.3 (pvr 003f 0203)

View File

@ -0,0 +1 @@
1

View File

@ -0,0 +1 @@
1

View File

@ -0,0 +1 @@
00000003

View File

@ -0,0 +1 @@
1

View File

@ -0,0 +1 @@
00000002

View File

@ -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

View File

@ -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

View File

@ -13,7 +13,9 @@
#if ! (defined __linux__ && (defined(__x86_64__) || \
defined(__amd64__) || \
defined(__i386__)))
defined(__i386__) || \
defined(__powerpc__) || \
defined(__powerpc64__)))
int
main(void)
@ -23,11 +25,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 +48,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 +92,29 @@ 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",
# if defined(__powerpc__) || \
defined(__powerpc64__)
if (virAsprintf(&sysfs_cpuinfo, "%s/nodeinfodata/linux-%s/cpu/",
abs_srcdir, (const char*)data) < 0 ||
virAsprintf(&output, "%s/nodeinfodata/linux-%s.txt",
virAsprintf(&cpuinfo, "%s/nodeinfodata/linux-%s-ppc.cpuinfo",
abs_srcdir, (const char*)data) < 0 ||
virAsprintf(&output, "%s/nodeinfodata/linux-%s-cpu-ppc-output.txt",
abs_srcdir, (const char*)data) < 0) {
# else
if (virAsprintf(&sysfs_cpuinfo, "%s/nodeinfodata/linux-%s/cpu/",
abs_srcdir, (const char*)data) < 0 ||
virAsprintf(&cpuinfo, "%s/nodeinfodata/linux-%s-x86.cpuinfo",
abs_srcdir, (const char*)data) < 0 ||
virAsprintf(&output, "%s/nodeinfodata/linux-%s-cpu-x86-output.txt",
abs_srcdir, (const char*)data) < 0) {
# endif
goto cleanup;
}
result = linuxTestCompareFiles(cpuinfo, output);
result = linuxTestCompareFiles(cpuinfo, sysfs_cpuinfo, output);
cleanup:
free(cpuinfo);
@ -112,12 +130,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)