summaryrefslogtreecommitdiffstats
path: root/src/vlib/threads.c
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2020-09-16 21:15:44 +0200
committerDamjan Marion <damarion@cisco.com>2020-09-16 21:19:51 +0200
commit57d1ec00a953620ff59242db07c369843bb16820 (patch)
tree7badde39e261f24c7a69221a87843a9acf030413 /src/vlib/threads.c
parent33ce5e568f8b4fb1254bf5ee32865e9443c0185a (diff)
vppinfra: introduce clib_mem_main
To hold more data later... Type: improvement Change-Id: I4006d22dcacd788988c4907f2c263fd4e4a9d398 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vlib/threads.c')
-rw-r--r--src/vlib/threads.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/vlib/threads.c b/src/vlib/threads.c
index d5096c8cd18..c2ac4a1b389 100644
--- a/src/vlib/threads.c
+++ b/src/vlib/threads.c
@@ -626,6 +626,7 @@ vlib_get_thread_core_numa (vlib_worker_thread_t * w, unsigned cpu_id)
static clib_error_t *
vlib_launch_thread_int (void *fp, vlib_worker_thread_t * w, unsigned cpu_id)
{
+ clib_mem_main_t *mm = &clib_mem_main;
vlib_thread_main_t *tm = &vlib_thread_main;
void *(*fp_arg) (void *) = fp;
void *numa_heap;
@@ -634,19 +635,19 @@ vlib_launch_thread_int (void *fp, vlib_worker_thread_t * w, unsigned cpu_id)
vlib_get_thread_core_numa (w, cpu_id);
/* Set up NUMA-bound heap if indicated */
- if (clib_per_numa_mheaps[w->numa_id] == 0)
+ if (mm->per_numa_mheaps[w->numa_id] == 0)
{
/* If the user requested a NUMA heap, create it... */
if (tm->numa_heap_size)
{
numa_heap = clib_mem_init_thread_safe_numa
(0 /* DIY */ , tm->numa_heap_size, w->numa_id);
- clib_per_numa_mheaps[w->numa_id] = numa_heap;
+ mm->per_numa_mheaps[w->numa_id] = numa_heap;
}
else
{
/* Or, use the main heap */
- clib_per_numa_mheaps[w->numa_id] = w->thread_mheap;
+ mm->per_numa_mheaps[w->numa_id] = w->thread_mheap;
}
}