diff --git a/include/maestro/env.h b/include/maestro/env.h index c7243b6d94b95f78278c328e955c61db6045aa1f..4562765cc96ebc2005db17dd6b39358391a16153 100644 --- a/include/maestro/env.h +++ b/include/maestro/env.h @@ -301,6 +301,13 @@ * */ #define MSTRO_ENV_BIND_CQ_HANDLER "MSTRO_BIND_CQ_HANDLER" +/** + * @berief Pin operation threads to a certain core(s) + * + * By default threads will not be pinned to a certain core + * */ +#define MSTRO_ENV_BIND_OP_THREAD "MSTRO_BIND_OP_THREAD" + /**@} (end of group MSTRO_ENV) */ #endif diff --git a/include/maestro/i_globals.h b/include/maestro/i_globals.h index 70f1868484fef00ffa20df967056b2a6cc2c92f2..0f1ae26f20965c83e94d1436ff90f5a969cd12c9 100644 --- a/include/maestro/i_globals.h +++ b/include/maestro/i_globals.h @@ -128,6 +128,27 @@ extern int g_numa_cq_bind_cores_len; /* id of the next core to pin from g_numa_cq_bind_cores list */ extern _Atomic(int) g_numa_cq_bind_next; +/* list of cores to bind operation threads to it, populated by parsing MSTRO_ENV_BIND_OP_HANDLER at mstro_core__numa_init */ +extern int *g_numa_op_bind_cores; +/* length of g_numa_op_bind_cores */ +extern int g_numa_op_bind_cores_len; +/* id of the next core to pin from g_numa_op_bind_cores list */ +extern _Atomic(int) g_numa_op_bind_next; + +/* list of cores to bind PM/PC threads to it, populated by parsing MSTRO_BIND_PM_PC at mstro_core__numa_init */ +extern int *g_numa_pm_pc_bind_cores; +/* length of g_numa_pm_pc_bind_cores */ +extern int g_numa_pm_pc_bind_cores_len; +/* id of the next core to pin from g_numa_pm_pc_bind_cores list */ +extern _Atomic(int) g_numa_pm_pc_bind_next; + +/* list of cores to bind transport threads to it, populated by parsing MSTRO_BIND_TRANSPORT_THREAD at mstro_core__numa_init */ +extern int *g_numa_transport_bind_cores; +/* length of g_numa_transport_bind_cores */ +extern int g_numa_transport_bind_cores_len; +/* id of the next core to pin from g_numa_transport_bind_cores list */ +extern _Atomic(int) g_numa_transport_bind_next; + /** Indicator for component block type 'undefined' */ #define MSTRO_COMPONENT_TYPE_UNDEF 0 /** Indicator for component block type Pool Manager */ diff --git a/maestro/core.c b/maestro/core.c index 26803d0f001e1ea9d36c0dca56caebd87ca75fbf..c9e5da51c26bd98d0cdf6cb8a82ea723900529bb 100644 --- a/maestro/core.c +++ b/maestro/core.c @@ -108,75 +108,75 @@ mstro_i_destroy_initdata(void* initdata) return; } -/*call from mstro_core_numa_init to initialize g_numa_cq_bind_cores and g_numa_cq_bind_cores_len from MSTRO_ENV_BIND_CQ_HANDLER +/*call from mstro_core_numa_init to initialize g_numa_XX_bind_cores and g_numa_XX_bind_cores_len from MSTRO_ENV_BIND_XXXX * we might replace this function with numa_parse_cpustring() to give us directly a cpumask*/ static inline mstro_status -mstro_core__numa_parse_BIND_CQ_threads(int **g_numa_cq_bind_cores, int *g_numa_cq_bind_cores_len) +mstro_core__numa_parse_user_bind_threads(int **cores, int *len,const char *cores_binding_env) { - mstro_status status = MSTRO_UNIMPL; - char *cq_cores = getenv(MSTRO_ENV_BIND_CQ_HANDLER); - if (cq_cores != NULL) - { - /*parse list of int in the form 1,2,3 or 1-3 */ - /*FIXME allow user to pass also a strategy, such as local or spread, to in all threads to same NUMA node - * or spread threads across NUMAs*/ - - /*find out first if the list is comma separated or a range - */ - if(strchr(cq_cores, ',')) - { - /*comma separated list*/ - /* count the commas*/ - char *s = cq_cores; + mstro_status status = MSTRO_UNIMPL; + /**read user binding for cq thread */ + char *char_cores = getenv(cores_binding_env); + if (char_cores != NULL) + { + /*parse list of int in the form 1,2,3 or 1-3 */ + /*FIXME allow user to pass also a strategy, such as local or spread, to in all threads to same NUMA node + * or spread threads across NUMAs*/ + + /*find out first if the list is comma separated or a range - */ + if(strchr(char_cores, ',')) + { + /*comma separated list*/ + /* count the commas*/ + char *s = char_cores; int i; for (i=0; s[i]; s[i]==',' ? i++ : *s++); - *g_numa_cq_bind_cores_len = i+1; /*#cores = #commas+1*/ - *g_numa_cq_bind_cores = malloc(*g_numa_cq_bind_cores_len*sizeof(int)); + *len = i+1; /*#cores = #commas+1*/ + *cores = malloc((*len)*sizeof(int)); /* fill the array */ - s = cq_cores; - for(int i=0; i< *g_numa_cq_bind_cores_len; i++) + s = char_cores; + for(int i=0; i< *len; i++) { - (*g_numa_cq_bind_cores)[i] = strtol(s,&s, 10); + (*cores)[i] = strtol(s,&s, 10); s++;/*jump ','*/ } status = MSTRO_OK; - } - else if(strchr(cq_cores, '-')) - { - /*range of cores*/ - char * pEnd; // rest of string - int num1 = strtol(cq_cores,&pEnd, 10); - int num2 = strtol(pEnd+1,&pEnd, 10); /*jump '-' character */ + } + else if(strchr(char_cores, '-')) + { + /*range of cores*/ + char * pEnd; // rest of string + int num1 = strtol(char_cores,&pEnd, 10); + int num2 = strtol(pEnd+1,&pEnd, 10); /*jump '-' character */ if(num2 < num1) { return MSTRO_FAIL; } - *g_numa_cq_bind_cores_len = num2 - num1 +1; - *g_numa_cq_bind_cores = malloc(*g_numa_cq_bind_cores_len*sizeof(int)); + *len = num2 - num1 +1; + *cores = malloc((*len)*sizeof(int)); /* fill the array */ - for(int i=0; i< *g_numa_cq_bind_cores_len; i++) + for(int i=0; i< *len; i++) { - (*g_numa_cq_bind_cores)[i] = num1+i; + (*cores)[i] = num1+i; } status = MSTRO_OK; - - } - else /* not a list, take the first number */ - { - *g_numa_cq_bind_cores_len = 1; - *g_numa_cq_bind_cores = malloc(sizeof(int)); - (*g_numa_cq_bind_cores)[0] = atoi(cq_cores); - status = MSTRO_OK; - } - } - else - { - /*User did not set any binding env*/ - *g_numa_cq_bind_cores = NULL; - *g_numa_cq_bind_cores_len = 0; - status = MSTRO_OK; - } - return status; + } + else /* not a list, take the first number */ + { + *len = 1; + *cores = malloc(sizeof(int)); + (*cores)[0] = atoi(char_cores); + status = MSTRO_OK; + } + } + else + { + /*User did not set any binding env*/ + *cores = NULL; + *len = 0; + status = MSTRO_OK; + } + return status; } static inline @@ -191,17 +191,35 @@ mstro_core__numa_init(void) DEBUG("NUMA: available with %d/%d nodes, %d/%d cpus\n", numa_num_task_nodes(), g_numa_configured_nodes, numa_num_task_cpus(), g_numa_configured_cpus); - /*parse MSTRO_ENV_BIND_CQ_HANDLER here to populate g_numa_cq_bind_cores list */ - mstro_status s= mstro_core__numa_parse_BIND_CQ_threads(&g_numa_cq_bind_cores, &g_numa_cq_bind_cores_len); + /*parse MSTRO_ENV_BIND_CQ_HANDLER here to populate cores list */ + mstro_status s= mstro_core__numa_parse_user_bind_threads(&g_numa_cq_bind_cores, &g_numa_cq_bind_cores_len,MSTRO_ENV_BIND_CQ_HANDLER); if(s != MSTRO_OK) { - ERR("Failed to parse MSTRO_BIND_CQ_HANDLER environment variable\n"); + ERR("Failed to parse %s environment variable\n", MSTRO_ENV_BIND_CQ_HANDLER); return s; } + /*parse MSTRO_ENV_BIND_TRANSPORT_THREAD here to populate cores list */ + s= mstro_core__numa_parse_user_bind_threads(&g_numa_transport_bind_cores, &g_numa_transport_bind_cores_len,MSTRO_ENV_BIND_TRANSPORT_THREAD); + if(s != MSTRO_OK) + { + ERR("Failed to parse %s environment variable\n", MSTRO_ENV_BIND_TRANSPORT_THREAD); + return s; + } + /*parse MSTRO_ENV_BIND_PM_PC here to populate cores list */ + s= mstro_core__numa_parse_user_bind_threads(&g_numa_pm_pc_bind_cores, &g_numa_pm_pc_bind_cores_len,MSTRO_ENV_BIND_PM_PC); + if(s != MSTRO_OK) + { + ERR("Failed to parse %s environment variable\n", MSTRO_ENV_BIND_PM_PC); + return s; + } + /*parse MSTRO_ENV_BIND_OP_THREAD here to populate cores list */ + s= mstro_core__numa_parse_user_bind_threads(&g_numa_op_bind_cores, &g_numa_op_bind_cores_len,MSTRO_ENV_BIND_OP_THREAD); + if(s != MSTRO_OK) + { + ERR("Failed to parse %s environment variable\n", MSTRO_ENV_BIND_OP_THREAD); + return s; + } /* FIXME: consider initializing some global data structures with this info */ - } else { - DEBUG("NUMA: not available on system\n"); - } #else g_have_numa = false; DEBUG("NUMA: not supported\n"); diff --git a/maestro/globals.c b/maestro/globals.c index 5ff60ef1ac4b9f34ad78ad4e221b36a4300690f2..0da9e27cd98e36d7f827d439be97d49136c6cb80 100644 --- a/maestro/globals.c +++ b/maestro/globals.c @@ -100,6 +100,8 @@ bool g_have_numa = false; int g_numa_configured_cpus=1; /** number of memory nodes in the system, derived from the node numbers in /sys/devices/system/node */ int g_numa_configured_nodes=1; + +/**FIXME maybe use a more proper resource structure for avaiable cores for each type of threads */ /* list of cores to bind CQ threads to it, populated by parsing MSTRO_ENV_BIND_CQ_HANDLER at mstro_core__numa_init */ int *g_numa_cq_bind_cores=NULL; /* length of g_numa_cq_bind_cores */ @@ -107,6 +109,27 @@ int g_numa_cq_bind_cores_len=0; /* id of the next core to pin from g_numa_cq_bind_cores list */ _Atomic(int) g_numa_cq_bind_next=0; +/* list of cores to bind operation threads to it, populated by parsing MSTRO_ENV_BIND_OP_HANDLER at mstro_core__numa_init */ +int *g_numa_op_bind_cores = NULL; +/* length of g_numa_op_bind_cores */ +int g_numa_op_bind_cores_len = 0; +/* id of the next core to pin from g_numa_op_bind_cores list */ +_Atomic(int) g_numa_op_bind_next = 0; + +/* list of cores to bind PM/PC threads to it, populated by parsing MSTRO_BIND_PM_PC at mstro_core__numa_init */ +int *g_numa_pm_pc_bind_cores = NULL; +/* length of g_numa_pm_pc_bind_cores */ +int g_numa_pm_pc_bind_cores_len = 0; +/* id of the next core to pin from g_numa_pm_pc_bind_cores list */ +_Atomic(int) g_numa_pm_pc_bind_next = 0; + +/* list of cores to bind transport threads to it, populated by parsing MSTRO_BIND_TRANSPORT_THREAD at mstro_core__numa_init */ +int *g_numa_transport_bind_cores= NULL; +/* length of g_numa_transport_bind_cores */ +int g_numa_transport_bind_cores_len = 0; +/* id of the next core to pin from g_numa_transport_bind_cores list */ +_Atomic(int) g_numa_transport_bind_next = 0; + /** APP id when connected to pool */ _Atomic(mstro_app_id) g_pool_app_id = MSTRO_APP_ID_INVALID; diff --git a/maestro/i_maestro_numa.h b/maestro/i_maestro_numa.h index 74a721fe4379a1b5499d0b4c505ab467d3e51b80..beb86f067558953b32ff3cdf8a1960c027d44f58 100644 --- a/maestro/i_maestro_numa.h +++ b/maestro/i_maestro_numa.h @@ -101,123 +101,14 @@ mstro_numa__num_nodes(void) #endif } -static inline -mstro_status -mstro_numa_bind_pm_pc(void) -{ - mstro_status status = MSTRO_UNIMPL; - char *pm_pc_core = getenv(MSTRO_ENV_BIND_PM_PC); - if(pm_pc_core !=NULL) { - #ifdef HAVE_NUMA - int core_num = atoi(pm_pc_core); - /*basic error checking */ - if ((core_num < 0) || (core_num >= g_numa_configured_cpus)) - { - LOG_ERR(MSTRO_LOG_MODULE_CORE, "Can not pin a thread to core number %d\n", core_num); - status = MSTRO_FAIL; - } - else - { - struct bitmask *cpu_mask = numa_allocate_cpumask(); - numa_bitmask_setbit(cpu_mask, core_num); - int ret = numa_sched_setaffinity(0, cpu_mask); - if(ret) - { - LOG_WARN(MSTRO_LOG_MODULE_CORE, - "Failed to pin PM/PC thread to core %d, %d (%s), " - "Please check workload manager cpu binding setting," - " e.g., try using --cpu-bind=v for slurm\n", - core_num,errno, strerror(errno)); - status=MSTRO_FAIL; - } - else { - LOG_INFO(MSTRO_LOG_MODULE_CORE, "PM/PC thread is pinned on core %d\n", core_num); - /*bind the thread to this numa node*/ - int numa_node = numa_node_of_cpu(core_num); - struct bitmask *nodemask= numa_allocate_cpumask(); - numa_bitmask_setbit(nodemask, numa_node); - numa_set_membind(nodemask); - numa_free_cpumask(nodemask); - status = MSTRO_OK; - } - numa_free_cpumask(cpu_mask); - } -#else - LOG_WARN(MSTRO_LOG_MODULE_CORE, - "Does not have libnuma, can not pin PM/PC thread\n"); - status = MSTRO_OK; -#endif - } - else - { - LOG_DEBUG(MSTRO_LOG_MODULE_CORE, "PM/PC thread is not pinned to any core\n"); - status = MSTRO_OK; - } - return status; -} /* * Hints for auto pinning * CQ handler threads create demand queue using mstro_pm_demand_queue_insert, * it might be better to keep PM and transport threads on the same numa domain * */ -static inline -mstro_status -mstro_numa_bind_transport_thread(void) -{ - mstro_status status = MSTRO_UNIMPL; - char *transport_core = getenv(MSTRO_ENV_BIND_TRANSPORT_THREAD); - if(transport_core !=NULL) { -#ifdef HAVE_NUMA - int core_num = atoi(transport_core); - /*basic error checking */ - if ((core_num < 0) || (core_num >= g_numa_configured_cpus)) - { - LOG_ERR(MSTRO_LOG_MODULE_CORE, "Can not pin a thread to core number %d\n", core_num); - status = MSTRO_FAIL; - } - else - { - struct bitmask *cpu_mask = numa_allocate_cpumask(); - numa_bitmask_setbit(cpu_mask, core_num); - int ret = numa_sched_setaffinity(0, cpu_mask); - if(ret) - { - LOG_WARN(MSTRO_LOG_MODULE_CORE, - "Failed to pin the transport thread to core %d, %d (%s), " - "Please check workload manager cpu binding setting," - " e.g., try using --cpu-bind=v for slurm\n", - core_num,errno, strerror(errno)); - status=MSTRO_FAIL; - } - else { - LOG_INFO(MSTRO_LOG_MODULE_CORE, "Transport thread is pinned on core %d\n", core_num); - /*bind the thread to this numa node*/ - int numa_node = numa_node_of_cpu(core_num); - struct bitmask *nodemask= numa_allocate_cpumask(); - numa_bitmask_setbit(nodemask, numa_node); - numa_set_membind(nodemask); - numa_free_cpumask(nodemask); - status = MSTRO_OK; - } - numa_free_cpumask(cpu_mask); - } -#else - LOG_WARN(MSTRO_LOG_MODULE_CORE, - "Does not have libnuma, can not pin transport thread\n"); - status = MSTRO_OK; -#endif - } - else - { - LOG_DEBUG(MSTRO_LOG_MODULE_CORE, "Transport thread is not pinned to any core\n"); - status = MSTRO_OK; - } - - return status; -} - +/**get a CQ handler thread core number */ static inline int mstro_numa__get_CQ_core_num(void) @@ -237,59 +128,138 @@ mstro_numa__get_CQ_core_num(void) } } +/**get a operations thread core number */ +static inline +int +mstro_numa__get_OP_core_num(void) +{ + int current_index=atomic_fetch_add(&g_numa_op_bind_next,1); + + /*check if operation core list is already populated */ + if(g_numa_op_bind_cores != NULL) + { + /*return the next number in the list*/ + current_index = current_index % g_numa_op_bind_cores_len; + return g_numa_op_bind_cores[current_index]; + } + else + { + return -1; + + } +} + +/**get a PM/PC thread core number */ +static inline +int +mstro_numa__get_pm_pc_core_num(void) +{ + int current_index=atomic_fetch_add(&g_numa_pm_pc_bind_next,1); + + /*check if PM/PC core list is already populated */ + if(g_numa_pm_pc_bind_cores != NULL) + { + /*return the next number in the list*/ + current_index = current_index % g_numa_pm_pc_bind_cores_len; + return g_numa_pm_pc_bind_cores[current_index]; + } + else + { + return -1; + + } +} +/**get a transport thread core number */ +static inline +int +mstro_numa__get_transport_core_num(void) +{ + int current_index=atomic_fetch_add(&g_numa_transport_bind_next,1); + + /*check if transport core list is already populated */ + if(g_numa_transport_bind_cores != NULL) + { + /*return the next number in the list*/ + current_index = current_index % g_numa_transport_bind_cores_len; + return g_numa_transport_bind_cores[current_index]; + } + else + { + return -1; + + } +} + static inline mstro_status -mstro_numa_bind_CQ_handlers(void) +mstro_numa_bind_thread(char *tidprefix) { - mstro_status status = MSTRO_UNIMPL; - int core_num = mstro_numa__get_CQ_core_num(); - if(core_num >= 0) { + mstro_status status = MSTRO_UNIMPL; + /**check we have NUMA enabled*/ #ifdef HAVE_NUMA - /*basic error checking */ - if (core_num >= g_numa_configured_cpus) + int core_num = 0; + /**get a core number to pin on it depending on thread type (tidprefix)*/ + if (strcmp(tidprefix, "CQ") == 0) + { + core_num = mstro_numa__get_CQ_core_num(); + } + else if ((strcmp(tidprefix, "OP") == 0)) + { + core_num = mstro_numa__get_OP_core_num(); + } + /**PM/PC*/ + else if ((strcmp(tidprefix, "PM") == 0)||(strcmp(tidprefix, "PC") == 0)) + { + core_num = mstro_numa__get_pm_pc_core_num(); + } + /**transport thread*/ + else if (strcmp(tidprefix, "transport") == 0) + { + core_num = mstro_numa__get_transport_core_num(); + } + else + { + LOG_ERR(MSTRO_LOG_MODULE_CORE, "Unknown thread type %s\n", tidprefix); + return MSTRO_FAIL; + } + + /*basic error checking */ + if (core_num >= g_numa_configured_cpus) + { + LOG_ERR(MSTRO_LOG_MODULE_CORE, "Can not pin a thread to core number %d\n", core_num); + status = MSTRO_FAIL; + } + else /**try to pin the thread*/ + { + struct bitmask *cpu_mask = numa_allocate_cpumask(); + numa_bitmask_setbit(cpu_mask, core_num); + int ret = numa_sched_setaffinity(0, cpu_mask); + if(ret) { - LOG_ERR(MSTRO_LOG_MODULE_CORE, "Can not pin a thread to core number %d\n", core_num); - status = MSTRO_FAIL; + LOG_WARN(MSTRO_LOG_MODULE_CORE, + "Failed to pin %s thread to core %d, %d (%s), " + "Please check workload manager cpu binding setting," + " e.g., try using --cpu-bind=v for slurm\n", + tidprefix,core_num,errno, strerror(errno)); + status=MSTRO_FAIL; } - else - { - struct bitmask *cpu_mask = numa_allocate_cpumask(); - numa_bitmask_setbit(cpu_mask, core_num); - int ret = numa_sched_setaffinity(0, cpu_mask); - if(ret) - { - LOG_WARN(MSTRO_LOG_MODULE_CORE, - "Failed to pin CQ thread to core %d, %d (%s), " - "Please check workload manager cpu binding setting," - " e.g., try using --cpu-bind=v for slurm\n", - core_num,errno, strerror(errno)); - status=MSTRO_FAIL; - } - else { - LOG_INFO(MSTRO_LOG_MODULE_CORE, "CQ thread is pinned on core %d\n", core_num); - /*bind the thread to this numa node*/ - int numa_node = numa_node_of_cpu(core_num); - struct bitmask *nodemask = numa_allocate_cpumask(); - numa_bitmask_setbit(nodemask, numa_node); - numa_set_membind(nodemask); - numa_free_cpumask(nodemask); - status = MSTRO_OK; - } - numa_free_cpumask(cpu_mask); + else { + LOG_INFO(MSTRO_LOG_MODULE_CORE, "%s thread is pinned on core %d\n", tidprefix, core_num); + /*bind the thread to this numa node*/ + int numa_node = numa_node_of_cpu(core_num); + struct bitmask *nodemask = numa_allocate_cpumask(); + numa_bitmask_setbit(nodemask, numa_node); + numa_set_membind(nodemask); + numa_free_cpumask(nodemask); + status = MSTRO_OK; } + numa_free_cpumask(cpu_mask); + } #else - LOG_WARN(MSTRO_LOG_MODULE_CORE, - "Does not have libnuma, can not pin CQ thread\n"); - status = MSTRO_OK; + LOG_WARN(MSTRO_LOG_MODULE_CORE, "Does not have libnuma, can not pin %s thread\n", tidprefix); + status = MSTRO_OK; #endif - } - else - { - LOG_DEBUG(MSTRO_LOG_MODULE_CORE," CQ thread is not pinned to any core\n"); - status = MSTRO_OK; - } - - return status; + return status; } static inline diff --git a/maestro/ofi.c b/maestro/ofi.c index 4c7c72dfdfd21d2aa6d80ee5ffdea4c64aa54875..cc78679a52dc1efed40fc61a3d7d2f6e351000f8 100644 --- a/maestro/ofi.c +++ b/maestro/ofi.c @@ -3555,8 +3555,8 @@ mstro_pc_thread(void *closure) assert(closure==NULL); DEBUG("PC thread starting\n"); /* check for pinning */ - s = mstro_numa_bind_pm_pc(); - /*failing to pin should not be fatal, an error message is already printed by mstro_numa_bind_pm_pc */ + s = mstro_numa_bind_thread("PC"); + /*failing to pin should not be fatal, an error message is already printed by mstro_numa_bind_thread */ INFO("Running on CPU: %d\n", mstro_numa_get_cpu()); #ifdef HAVE_MIO struct mio_thread mthread; diff --git a/maestro/pool_manager_ofi.c b/maestro/pool_manager_ofi.c index bbe2cfaa3a322036c0694348862b18fbeea9564c..0501f9992f16e8b7fe22d8b95f145b5a9cef7645 100644 --- a/maestro/pool_manager_ofi.c +++ b/maestro/pool_manager_ofi.c @@ -57,7 +57,7 @@ #define WARN(...) LOG_WARN(MSTRO_LOG_MODULE_PM,__VA_ARGS__) #define ERR(...) LOG_ERR(MSTRO_LOG_MODULE_PM,__VA_ARGS__) - + /* internal entry point: started in a pthread, runs PM loop until it * is told to terminate (when g_pm_stop is set) */ @@ -71,8 +71,8 @@ mstro_pm_thread(void *closure) mstro_status s = MSTRO_OK; assert(closure==NULL); /* Check pining to cpu */ - s = mstro_numa_bind_pm_pc(); - /*failing to pin should not be fatal, an error message is already printed by mstro_numa_bind_pm_pc */ + s = mstro_numa_bind_thread("PM"); + /*failing to pin should not be fatal, an error message is already printed by mstro_numa_bind_thread*/ DEBUG("PM thread starting\n"); INFO("Running on CPU: %d\n", mstro_numa_get_cpu()); @@ -95,7 +95,7 @@ mstro_pm_transport_init_thread_fun(void *closure) DEBUG("PM transport initiator thread starting\n"); /* check pinning of transport thread */ - s = mstro_numa_bind_transport_thread(); + s = mstro_numa_bind_thread("transport"); INFO("Running on CPU: %d\n", mstro_numa_get_cpu()); while(!atomic_load(&g_pm_stop)) { s = mstro_pm_handle_demand_queue(); diff --git a/maestro/thread_team.c b/maestro/thread_team.c index 5ae2871864024eef1f7ed8841628dbff05afb999..5331e1d73fda54c6143b12b427c5477caa13fd85 100644 --- a/maestro/thread_team.c +++ b/maestro/thread_team.c @@ -72,7 +72,7 @@ erl_thread_team_threadfun(void *closure) DEBUG("%s handler thread %zu running\n", ctx->tidprefix, ctx->id); /*check thread pinning*/ - s = mstro_numa_bind_CQ_handlers(); + s = mstro_numa_bind_thread(ctx->tidprefix); if(s != MSTRO_OK) { WARN("Failed to pin the thread \n");