mem: per-CPU allocator cache (ThunderX2 workaround)
Change-Id: I7694524c5e9674a6f7bfcd911f8b0dbbead7df5a
This commit is contained in:
committed by
Masamichi Takagi
parent
239c95449b
commit
99fba2df1c
@@ -42,9 +42,11 @@ void cpu_local_var_init(void)
|
||||
clv[i].monitor = monitor->cpu + i;
|
||||
clv[i].rusage = rusage.cpu + i;
|
||||
INIT_LIST_HEAD(&clv[i].smp_func_req_list);
|
||||
clv[i].free_chunks.rb_node = NULL;
|
||||
}
|
||||
|
||||
cpu_local_var_initialized = 1;
|
||||
smp_mb();
|
||||
}
|
||||
|
||||
struct cpu_local_var *get_cpu_local_var(int id)
|
||||
|
||||
@@ -103,8 +103,11 @@ struct cpu_local_var {
|
||||
|
||||
/* UTI */
|
||||
void *uti_futex_resp;
|
||||
/* Per-CPU memory allocator cache */
|
||||
struct rb_root free_chunks;
|
||||
} __attribute__((aligned(64)));
|
||||
|
||||
extern int cpu_local_var_initialized;
|
||||
|
||||
struct cpu_local_var *get_cpu_local_var(int id);
|
||||
static struct cpu_local_var *get_this_cpu_local_var(void)
|
||||
|
||||
Reference in New Issue
Block a user