mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-17 17:44:40 +02:00
8220310: Implementation: NUMA-Aware Memory Allocation for G1, Mutator (1/3)
Reviewed-by: kbarrett, sjohanss, tschatzl, pliden
This commit is contained in:
parent
b171594072
commit
52116d808c
32 changed files with 990 additions and 88 deletions
|
@ -3007,6 +3007,23 @@ int os::numa_get_group_id() {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int os::numa_get_group_id_for_address(const void* address) {
|
||||
#ifndef MPOL_F_NODE
|
||||
#define MPOL_F_NODE (1<<0) // Return next IL mode instead of node mask
|
||||
#endif
|
||||
|
||||
#ifndef MPOL_F_ADDR
|
||||
#define MPOL_F_ADDR (1<<1) // Look up VMA using address
|
||||
#endif
|
||||
|
||||
int id = 0;
|
||||
|
||||
if (syscall(SYS_get_mempolicy, &id, NULL, 0, const_cast<void*>(address), MPOL_F_NODE | MPOL_F_ADDR) == -1) {
|
||||
return -1;
|
||||
}
|
||||
return id;
|
||||
}
|
||||
|
||||
int os::Linux::get_existing_num_nodes() {
|
||||
int node;
|
||||
int highest_node_number = Linux::numa_max_node();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue