diff --git a/maestro/thread_team.c b/maestro/thread_team.c index 1ac724838e9193e3f57de4fbc5356bc14a6f8e10..61f3804273f377e38e0d3301ddca611026f737c3 100644 --- a/maestro/thread_team.c +++ b/maestro/thread_team.c @@ -53,7 +53,7 @@ erl_thread_team_bind_and_update_numa(struct erl_thread_team_ctx *ctx) #ifdef HAVE_NUMA /**update numa node*/ - int numa_node = numa_node_of_cpu(mstro_numa_get_cpu(void)); + int numa_node = numa_node_of_cpu(mstro_numa_get_cpu()); ctx->numa_node = numa_node; #endif @@ -70,6 +70,13 @@ erl_thread_team_threadfun(void *closure) char threadid[TID_LEN]; struct erl_thread_team_ctx *ctx = (struct erl_thread_team_ctx*)closure; + /*check thread pinning and update ctx numa*/ + mstro_status status = erl_thread_team_bind_and_update_numa(ctx); + if(status != MSTRO_OK) + { + WARN("Failed to pin the thread \n"); + } + int n = snprintf(threadid, TID_LEN, "%s-H-%d-%zu", ctx->tidprefix, ctx->numa_node, ctx->id); if(n>=TID_LEN) { @@ -85,12 +92,6 @@ erl_thread_team_threadfun(void *closure) } DEBUG("%s handler thread %zu running\n", ctx->tidprefix, ctx->id); - /*check thread pinning*/ - s = erl_thread_team_bind_and_update_numa(ctx); - if(s != MSTRO_OK) - { - WARN("Failed to pin the thread \n"); - } INFO("Running on CPU: %d\n", mstro_numa_get_cpu()); do {