support E3950 in MT 2.0 on both Linux and Windows (#21735)
This commit is contained in:
1 parent
058d488083
commit
d5b80062d9
4 files changed
+89
-21
No files matched your search
@@ -415,17 +415,22 @@ void parse_cache_info_linux(const std::vector<std::vector<std::string>> system_i
|
||||
core_1 = std::stoi(sub_str);
|
||||
sub_str = system_info_table[nproc][1].substr(endpos + 1);
|
||||
core_2 = std::stoi(sub_str);
|
||||
if ((core_2 - core_1 == 1) && (_proc_type_table[0][EFFICIENT_CORE_PROC] == 0)) {
|
||||
_cpu_mapping_table[core_1][CPU_MAP_CORE_TYPE] = MAIN_CORE_PROC;
|
||||
} else {
|
||||
_cpu_mapping_table[core_1][CPU_MAP_CORE_TYPE] = EFFICIENT_CORE_PROC;
|
||||
}
|
||||
|
||||
for (int m = core_1; m <= core_2; m++) {
|
||||
_cpu_mapping_table[m][CPU_MAP_PROCESSOR_ID] = m;
|
||||
_cpu_mapping_table[m][CPU_MAP_CORE_ID] = _cores;
|
||||
_cpu_mapping_table[m][CPU_MAP_CORE_TYPE] = EFFICIENT_CORE_PROC;
|
||||
_cpu_mapping_table[m][CPU_MAP_CORE_TYPE] = _cpu_mapping_table[core_1][CPU_MAP_CORE_TYPE];
|
||||
_cpu_mapping_table[m][CPU_MAP_GROUP_ID] = n_group;
|
||||
|
||||
_cores++;
|
||||
|
||||
_proc_type_table[0][ALL_PROC]++;
|
||||
_proc_type_table[0][EFFICIENT_CORE_PROC]++;
|
||||
_proc_type_table[0][_cpu_mapping_table[m][CPU_MAP_CORE_TYPE]]++;
|
||||
}
|
||||
} else {
|
||||
core_1 = std::stoi(system_info_table[nproc][0]);
|
||||
|
||||
@@ -163,36 +163,45 @@ void parse_processor_info_win(const char* base_ptr,
|
||||
if (_processors <= list[list_len - 1] + base_proc) {
|
||||
group_start = list[0];
|
||||
group_end = list[list_len - 1];
|
||||
group_id = group;
|
||||
group_type = EFFICIENT_CORE_PROC;
|
||||
}
|
||||
for (int m = 0; m < _processors - list[0]; m++) {
|
||||
_cpu_mapping_table[list[m] + base_proc][CPU_MAP_CORE_TYPE] = EFFICIENT_CORE_PROC;
|
||||
_cpu_mapping_table[list[m] + base_proc][CPU_MAP_GROUP_ID] = group;
|
||||
_proc_type_table[0][EFFICIENT_CORE_PROC]++;
|
||||
}
|
||||
group++;
|
||||
|
||||
} else if ((2 == list_len) && (-1 == _cpu_mapping_table[list[0] + base_proc][CPU_MAP_CORE_TYPE])) {
|
||||
if (_processors <= list[list_len - 1] + base_proc) {
|
||||
group_start = list[0];
|
||||
group_end = list[list_len - 1];
|
||||
group_id = CPU_BLOCKED;
|
||||
group_id = group++;
|
||||
group_type = EFFICIENT_CORE_PROC;
|
||||
}
|
||||
for (int m = 0; m < _processors - list[0]; m++) {
|
||||
_cpu_mapping_table[list[m] + base_proc][CPU_MAP_CORE_TYPE] = EFFICIENT_CORE_PROC;
|
||||
_cpu_mapping_table[list[m] + base_proc][CPU_MAP_GROUP_ID] = group_id;
|
||||
_cpu_mapping_table[list[m] + base_proc][CPU_MAP_USED_FLAG] = CPU_BLOCKED;
|
||||
_proc_type_table[0][EFFICIENT_CORE_PROC]++;
|
||||
}
|
||||
_blocked_cores++;
|
||||
} else if ((2 == list_len) && (-1 == _cpu_mapping_table[list[0] + base_proc][CPU_MAP_CORE_TYPE])) {
|
||||
if (_processors <= list[list_len - 1] + base_proc) {
|
||||
group_start = list[0];
|
||||
group_end = list[list_len - 1];
|
||||
if (_proc_type_table[0][EFFICIENT_CORE_PROC] > 0) {
|
||||
group_id = CPU_BLOCKED;
|
||||
group_type = EFFICIENT_CORE_PROC;
|
||||
_blocked_cores++;
|
||||
} else {
|
||||
group_id = group++;
|
||||
group_type = MAIN_CORE_PROC;
|
||||
}
|
||||
}
|
||||
for (int m = 0; m < _processors - list[0]; m++) {
|
||||
_cpu_mapping_table[list[m] + base_proc][CPU_MAP_CORE_TYPE] = group_type;
|
||||
_cpu_mapping_table[list[m] + base_proc][CPU_MAP_GROUP_ID] = group_id;
|
||||
if (group_id == CPU_BLOCKED) {
|
||||
_cpu_mapping_table[list[m] + base_proc][CPU_MAP_USED_FLAG] = CPU_BLOCKED;
|
||||
} else {
|
||||
_cpu_mapping_table[list[m] + base_proc][CPU_MAP_USED_FLAG] = NOT_USED;
|
||||
_proc_type_table[0][MAIN_CORE_PROC]++;
|
||||
}
|
||||
}
|
||||
|
||||
} else if (1 == list_len) {
|
||||
if ((_cpu_mapping_table.size() > list[0]) &&
|
||||
(_cpu_mapping_table[list[0] + base_proc][CPU_MAP_CORE_TYPE] == -1)) {
|
||||
group_id = group++;
|
||||
_cpu_mapping_table[list[0] + base_proc][CPU_MAP_CORE_TYPE] = MAIN_CORE_PROC;
|
||||
_cpu_mapping_table[list[0] + base_proc][CPU_MAP_GROUP_ID] = group;
|
||||
_cpu_mapping_table[list[0] + base_proc][CPU_MAP_GROUP_ID] = group_id;
|
||||
_proc_type_table[0][MAIN_CORE_PROC]++;
|
||||
group++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1172,6 +1172,26 @@ LinuxCpuMapTestCase cache_1sockets_6cores_hyperthreading = {
|
||||
},
|
||||
{},
|
||||
};
|
||||
LinuxCpuMapTestCase cache_1sockets_4cores = {
|
||||
4,
|
||||
1,
|
||||
1,
|
||||
4,
|
||||
{{4, 4, 0, 0, 0, 0}},
|
||||
{
|
||||
{0, 0, 0, 0, MAIN_CORE_PROC, 0, -1},
|
||||
{1, 0, 0, 1, MAIN_CORE_PROC, 0, -1},
|
||||
{2, 0, 0, 2, MAIN_CORE_PROC, 1, -1},
|
||||
{3, 0, 0, 3, MAIN_CORE_PROC, 1, -1},
|
||||
},
|
||||
{
|
||||
{{"0"}, {"0-1"}, {"0-3"}},
|
||||
{{"1"}, {"0-1"}, {"0-3"}},
|
||||
{{"2"}, {"2-3"}, {"0-3"}},
|
||||
{{"3"}, {"2-3"}, {"0-3"}},
|
||||
},
|
||||
{},
|
||||
};
|
||||
LinuxCpuMapTestCase cache_VM_cache_0 = {
|
||||
0,
|
||||
0,
|
||||
@@ -1215,6 +1235,7 @@ INSTANTIATE_TEST_SUITE_P(CPUMap,
|
||||
cache_1sockets_10cores_hyperthreading,
|
||||
cache_1sockets_8cores_hyperthreading,
|
||||
cache_1sockets_6cores_hyperthreading,
|
||||
cache_1sockets_4cores,
|
||||
cache_VM_cache_0));
|
||||
|
||||
TEST_P(LinuxGetCpuMapFromCoresTests, LinuxCore) {}
|
||||
|
||||
@@ -2144,6 +2144,38 @@ WinCpuMapTestCase _1sockets_6cores_hyperthreading_FMT7 = {
|
||||
"0000000000000000000000000000000000000000000000000000000000000000000000000ff0f000000000000"},
|
||||
};
|
||||
|
||||
WinCpuMapTestCase _1sockets_4cores = {
|
||||
4,
|
||||
1,
|
||||
1,
|
||||
4,
|
||||
0,
|
||||
{{4, 4, 0, 0, 0, 0}},
|
||||
{
|
||||
{0, 0, 0, 0, MAIN_CORE_PROC, 0, -1},
|
||||
{1, 0, 0, 1, MAIN_CORE_PROC, 0, -1},
|
||||
{2, 0, 0, 2, MAIN_CORE_PROC, 1, -1},
|
||||
{3, 0, 0, 3, MAIN_CORE_PROC, 1, -1},
|
||||
},
|
||||
{"03000000300000000000000000000000000000000000000000000000000001000f00000000000000000000000000000000000000300000000"
|
||||
"00000000000000000000000000000000000000000000100010000000000000000000000000000000200000038000000010640000060000002"
|
||||
"00000000000000000000000000000000000000000000000100000000000000000000000000000002000000380000000108400000800000010"
|
||||
"00000000000000000000000000000000000000000000001000000000000000000000000000000020000003800000002104000000010000000"
|
||||
"00000000000000000000000000000000000000000000030000000000000000000000000000000000000030000000000000000000000000000"
|
||||
"00000000000000000000000010002000000000000000000000000000000020000003800000001064000006000000200000000000000000000"
|
||||
"00000000000000000000000000020000000000000000000000000000000200000038000000010840000080000001000000000000000000000"
|
||||
"00000000000000000000000000200000000000000000000000000000000000000300000000000000000000000000000000000000000000000"
|
||||
"00000100040000000000000000000000000000000200000038000000010640000060000002000000000000000000000000000000000000000"
|
||||
"00000000400000000000000000000000000000002000000380000000108400000800000010000000000000000000000000000000000000000"
|
||||
"00000004000000000000000000000000000000020000003800000002104000000010000000000000000000000000000000000000000000000"
|
||||
"000000c0000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000100080000000000"
|
||||
"00000000000000000000020000003800000001064000006000000200000000000000000000000000000000000000000000000800000000000"
|
||||
"00000000000000000000200000038000000010840000080000001000000000000000000000000000000000000000000000008000000000000"
|
||||
"00000000000000000001000000300000000000000000000000000000000000000000000000000000000f00000000000000000000000000000"
|
||||
"00400000050000000010001000000000000000000000000000000000000000000040400000000000000000000000000000000000000000000"
|
||||
"000000000000000000000000000000000f00000000000000"},
|
||||
};
|
||||
|
||||
WinCpuMapTestCase _1sockets_4cores_hyperthreading = {
|
||||
8,
|
||||
1,
|
||||
@@ -2304,6 +2336,7 @@ INSTANTIATE_TEST_SUITE_P(CPUMap,
|
||||
_1sockets_14cores_hyperthreading_set3,
|
||||
_1sockets_10cores_hyperthreading,
|
||||
_1sockets_6cores_hyperthreading_FMT7,
|
||||
_1sockets_4cores,
|
||||
_1sockets_4cores_hyperthreading,
|
||||
_1sockets_4cores_hyperthreading_1_FMT7,
|
||||
_1sockets_4cores_hyperthreading_2_FMT7,
|
||||
|
||||
Reference in new issue
Block a user