Skip to content

Commit

Permalink
modify max_threads_per_core for throughput
Browse files Browse the repository at this point in the history
  • Loading branch information
sunxiaoxia2022 committed Aug 3, 2023
1 parent c236e1b commit 15f1c1d
Showing 1 changed file with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,23 +36,18 @@ void get_cur_stream_info(const int stream_id,
core_type = streams_info_table[stream_info_id][PROC_TYPE];
numa_node_id = streams_info_table[stream_info_id][STREAM_NUMA_NODE_ID];
max_threads_per_core = 1;
bool have_main_core_proc = false;
bool have_hyper_threading_proc = false;
if (core_type == ALL_PROC) {
for (size_t i = stream_info_id + 1; i < streams_info_table.size(); i++) {
if (streams_info_table[i][NUMBER_OF_STREAMS] == 0) {
if (streams_info_table[i][PROC_TYPE] == HYPER_THREADING_PROC) {
have_hyper_threading_proc = true;
} else if (streams_info_table[i][PROC_TYPE] == MAIN_CORE_PROC) {
have_main_core_proc = true;
max_threads_per_core = 2;
break;
}
} else {
break;
}
}
}

if (have_main_core_proc && have_hyper_threading_proc) {
} else if (core_type == HYPER_THREADING_PROC) {
max_threads_per_core = 2;
}

Expand Down

0 comments on commit 15f1c1d

Please sign in to comment.