Skip to content
Snippets Groups Projects
Commit 6335b735 authored by Ali Mohammed's avatar Ali Mohammed
Browse files

update numa node of thread teams

parent debeafb3
Branches
Tags
No related merge requests found
......@@ -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 {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment