Skip to content

Commit fd1815e

Browse files
flying-122bonzini
authored andcommitted
KVM: X86: Use GFP_KERNEL_ACCOUNT for pid_table in ipiv
The pid_table of ipiv is the persistent memory allocated by per-vcpu, which should be counted into the memory cgroup. Signed-off-by: Peng Hao <flyingpeng@tencent.com> Message-Id: <CAPm50aLxCQ3TQP2Lhc0PX3y00iTRg+mniLBqNDOC=t9CLxMwwA@mail.gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
1 parent bf67272 commit fd1815e

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

arch/x86/kvm/vmx/vmx.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4651,7 +4651,8 @@ static int vmx_alloc_ipiv_pid_table(struct kvm *kvm)
46514651
if (kvm_vmx->pid_table)
46524652
return 0;
46534653

4654-
pages = alloc_pages(GFP_KERNEL | __GFP_ZERO, vmx_get_pid_table_order(kvm));
4654+
pages = alloc_pages(GFP_KERNEL_ACCOUNT | __GFP_ZERO,
4655+
vmx_get_pid_table_order(kvm));
46554656
if (!pages)
46564657
return -ENOMEM;
46574658

0 commit comments

Comments
 (0)