NUMA: get_mempolicy(), set_mempolicy() and mbind() implementation

This commit is contained in:
Balazs Gerofi
2016-11-05 13:32:02 +09:00
parent e46f027894
commit 0f826290d0
3 changed files with 409 additions and 11 deletions

View File

@@ -369,6 +369,13 @@ struct vm_range {
int padding;
};
struct vm_range_numa_policy {
struct list_head list;
unsigned long start, end;
DECLARE_BITMAP(numa_mask, PROCESS_NUMA_MASK_BITS);
int numa_mem_policy;
};
struct vm_regions {
unsigned long vm_start, vm_end;
unsigned long text_start, text_end;
@@ -660,6 +667,8 @@ struct process_vm {
long currss;
DECLARE_BITMAP(numa_mask, PROCESS_NUMA_MASK_BITS);
int numa_mem_policy;
/* Protected by memory_range_lock */
struct list_head vm_range_numa_policy_list;
};
static inline int has_cap_ipc_lock(struct thread *th)