summaryrefslogtreecommitdiffstats
path: root/arch/x86/include
diff options
context:
space:
mode:
authorBen Gardon <bgardon@google.com>2019-02-11 11:02:51 -0800
committerPaolo Bonzini <pbonzini@redhat.com>2019-02-20 22:48:31 +0100
commit1ec696470c860e2b1b95e178e368e180ad2b040f (patch)
tree69a1726a4bd736db5bed6cf7d5271870212f6af5 /arch/x86/include
parent254272ce6505948ecc0b4bf5cd0aa61cdd815994 (diff)
downloadtalos-op-linux-1ec696470c860e2b1b95e178e368e180ad2b040f.tar.gz
talos-op-linux-1ec696470c860e2b1b95e178e368e180ad2b040f.zip
kvm: svm: Add memcg accounting to KVM allocations
There are many KVM kernel memory allocations which are tied to the life of the VM process and should be charged to the VM process's cgroup. If the allocations aren't tied to the process, the OOM killer will not know that killing the process will free the associated kernel memory. Add __GFP_ACCOUNT flags to many of the allocations which are not yet being charged to the VM process's cgroup. Tested: Ran all kvm-unit-tests on a 64 bit Haswell machine, the patch introduced no new failures. Ran a kernel memory accounting test which creates a VM to touch memory and then checks that the kernel memory allocated for the process is within certain bounds. With this patch we account for much more of the vmalloc and slab memory allocated for the VM. Signed-off-by: Ben Gardon <bgardon@google.com> Reviewed-by: Shakeel Butt <shakeelb@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/include')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud