memory: init virt to phys mapping after binding memory to node
Binding may cause memory to move, so initialize the page map after it is done.
This commit is contained in:
@@ -837,9 +837,6 @@ void configure(std::vector<resource::memory> m,
|
||||
cpu_mem.replace_memory_backing(sys_alloc);
|
||||
}
|
||||
cpu_mem.resize(total, sys_alloc);
|
||||
if (hugetlbfs_path) {
|
||||
cpu_mem.init_virt_to_phys_map();
|
||||
}
|
||||
size_t pos = 0;
|
||||
for (auto&& x : m) {
|
||||
#ifdef HAVE_NUMA
|
||||
@@ -852,6 +849,9 @@ void configure(std::vector<resource::memory> m,
|
||||
#endif
|
||||
pos += x.bytes;
|
||||
}
|
||||
if (hugetlbfs_path) {
|
||||
cpu_mem.init_virt_to_phys_map();
|
||||
}
|
||||
}
|
||||
|
||||
statistics stats() {
|
||||
|
||||
Reference in New Issue
Block a user