Commit bf7dfa8d authored by wujing's avatar wujing

fix core setting if there are 8cores, os core0,1 rcc core2,3 rru core 5,6

parent 860c5dc2
...@@ -307,11 +307,25 @@ void thread_top_init(char *thread_name, ...@@ -307,11 +307,25 @@ void thread_top_init(char *thread_name,
CPU_SET(0,&cpuset); CPU_SET(0,&cpuset);
else { else {
if (nfapi_mode == 2) { if (nfapi_mode == 2) {
for (j = 0; j < 2; j++) if (get_nprocs() >= 8) {
CPU_SET(j, &cpuset); for (j = 2; j < 4; j++) {
CPU_SET(j, &cpuset);
}
} else {
for (j = 0; j < 2; j++) {
CPU_SET(j, &cpuset);
}
}
} else if (nfapi_mode == 1) { } else if (nfapi_mode == 1) {
for (j = 2; j < 4; j++) if (get_nprocs() >= 8) {
CPU_SET(j, &cpuset); for (j = 5; j < 7; j++) {
CPU_SET(j, &cpuset);
}
} else {
for (j = 2; j < 4; j++) {
CPU_SET(j, &cpuset);
}
}
} else { } else {
for (j = 1; j < get_nprocs(); j++) for (j = 1; j < get_nprocs(); j++)
CPU_SET(j, &cpuset); CPU_SET(j, &cpuset);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment