-
Notifications
You must be signed in to change notification settings - Fork 449
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use a minimum of 1 thread per core for CPU total calculation (#1756)
In some LXD containers running with VT-x hardware virtualization, it appears that threads per core is 0, resulting in a total number of CPUs of 0. Add a test case and handle some quirks with the `lscpu` output. Closes #1755 Signed-off-by: Stan Hu <[email protected]>
- Loading branch information
Showing
5 changed files
with
169 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
processor : 0 | ||
vendor_id : GenuineIntel | ||
cpu family : 6 | ||
model : 26 | ||
model name : Intel(R) Xeon(R) CPU X5570 @ 2.93GHz | ||
stepping : 5 | ||
microcode : 0x1d | ||
cpu MHz : 1703.430 | ||
cache size : 8192 KB | ||
physical id : 1 | ||
siblings : 8 | ||
core id : 2 | ||
cpu cores : 4 | ||
apicid : 21 | ||
initial apicid : 21 | ||
fpu : yes | ||
fpu_exception : yes | ||
cpuid level : 11 | ||
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 pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 sse4_2 popcnt lahf_lm pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid dtherm ida flush_l1d | ||
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit | ||
bogomips : 5851.81 | ||
clflush size : 64 | ||
cache_alignment : 64 | ||
address sizes : 40 bits physical, 48 bits virtual | ||
power management: | ||
|
||
processor : 1 | ||
vendor_id : GenuineIntel | ||
cpu family : 6 | ||
model : 26 | ||
model name : Intel(R) Xeon(R) CPU X5570 @ 2.93GHz | ||
stepping : 5 | ||
microcode : 0x1d | ||
cpu MHz : 1749.755 | ||
cache size : 8192 KB | ||
physical id : 0 | ||
siblings : 8 | ||
core id : 2 | ||
cpu cores : 4 | ||
apicid : 5 | ||
initial apicid : 5 | ||
fpu : yes | ||
fpu_exception : yes | ||
cpuid level : 11 | ||
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 pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 sse4_2 popcnt lahf_lm pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid dtherm ida flush_l1d | ||
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit | ||
bogomips : 5851.58 | ||
clflush size : 64 | ||
cache_alignment : 64 | ||
address sizes : 40 bits physical, 48 bits virtual | ||
power management: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# The following is the parsable format, which can be fed to other | ||
# programs. Each different item in every column has an unique ID | ||
# starting from zero. | ||
# CPU,Core,Socket | ||
12,4,0 | ||
13,5,1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
Architecture: x86_64 | ||
CPU op-mode(s): 32-bit, 64-bit | ||
Byte Order: Little Endian | ||
Address sizes: 40 bits physical, 48 bits virtual | ||
CPU(s): 16 | ||
On-line CPU(s) list: 0,2,5,9 | ||
Off-line CPU(s) list: 1,3,4,6-8,10-15 | ||
Thread(s) per core: 0 | ||
Core(s) per socket: 4 | ||
Socket(s): 2 | ||
NUMA node(s): 2 | ||
Vendor ID: GenuineIntel | ||
CPU family: 6 | ||
Model: 26 | ||
Model name: Intel(R) Xeon(R) CPU X5570 @ 2.93GHz | ||
Stepping: 5 | ||
CPU MHz: 1596.085 | ||
BogoMIPS: 5852.18 | ||
Virtualization: VT-x | ||
L1d cache: 32K | ||
L1i cache: 32K | ||
L2 cache: 256K | ||
L3 cache: 8192K | ||
NUMA node0 CPU(s): 0,2,4,6,8,10,12,14 | ||
NUMA node1 CPU(s): 1,3,5,7,9,11,13,15 | ||
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 ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 sse4_2 popcnt lahf_lm pti tpr_shadow vnmi flexpriority ept vpid dtherm ida |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters