get_mempolicy(): store policy in per-process VM structure

This commit is contained in:
Balazs Gerofi
2016-10-16 09:10:36 +09:00
parent b88d75720f
commit 99a02e2941
3 changed files with 16 additions and 11 deletions

View File

@ -223,6 +223,7 @@ init_process_vm(struct process *owner, struct address_space *asp, struct process
}
set_bit(i, &vm->numa_mask[0]);
}
vm->numa_mem_policy = MPOL_DEFAULT;
return 0;
}
@ -384,6 +385,8 @@ clone_thread(struct thread *org, unsigned long pc, unsigned long sp,
}
memcpy(&proc->vm->numa_mask, &org->vm->numa_mask,
sizeof(proc->vm->numa_mask));
proc->vm->numa_mem_policy =
org->vm->numa_mem_policy;
thread->proc = proc;
thread->vm = proc->vm;