Wanpeng Li d9a710e5fc KVM: X86: Dynamically allocate user_fpu
After reverting commit 240c35a3783a (kvm: x86: Use task structs fpu field
for user), struct kvm_vcpu is 19456 bytes on my server, PAGE_ALLOC_COSTLY_ORDER(3)
is the order at which allocations are deemed costly to service. In serveless
scenario, one host can service hundreds/thoudands firecracker/kata-container
instances, howerver, new instance will fail to launch after memory is too
fragmented to allocate kvm_vcpu struct on host, this was observed in some
cloud provider product environments.

This patch dynamically allocates user_fpu, kvm_vcpu is 15168 bytes now on my
Skylake server.

Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Radim Krčmář <rkrcmar@redhat.com>
Signed-off-by: Wanpeng Li <wanpengli@tencent.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2019-07-22 13:55:48 +02:00
..
2019-07-12 16:06:27 -07:00
2019-07-12 16:03:16 -07:00
2019-07-12 15:35:14 -07:00
2019-07-12 16:06:27 -07:00
2019-07-12 16:06:27 -07:00
2019-07-11 10:09:44 -07:00
2019-07-12 15:41:33 -07:00
2019-07-12 16:06:27 -07:00
2019-07-12 15:38:05 -07:00
2019-07-12 16:03:16 -07:00
2019-07-12 16:03:16 -07:00
2019-07-12 16:06:27 -07:00
2019-07-12 15:41:33 -07:00
2019-07-12 16:03:16 -07:00
2019-07-12 16:06:27 -07:00
2019-07-12 15:13:55 -07:00