diff options
author | Marc Zyngier <maz@kernel.org> | 2021-11-16 19:04:01 +0300 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2021-12-08 12:24:14 +0300 |
commit | c5b077549136584618a66258f09d8d4b41e7409c (patch) | |
tree | 6d8e307d3e7bb7ba976a12f3b235463e9253d31d /arch/s390/kvm | |
parent | 113d10bca23cdd522da26969b96db8711b182642 (diff) | |
download | linux-c5b077549136584618a66258f09d8d4b41e7409c.tar.xz |
KVM: Convert the kvm->vcpus array to a xarray
At least on arm64 and x86, the vcpus array is pretty huge (up to
1024 entries on x86) and is mostly empty in the majority of the cases
(running 1k vcpu VMs is not that common).
This mean that we end-up with a 4kB block of unused memory in the
middle of the kvm structure.
Instead of wasting away this memory, let's use an xarray instead,
which gives us almost the same flexibility as a normal array, but
with a reduced memory usage with smaller VMs.
Signed-off-by: Marc Zyngier <maz@kernel.org>
Message-Id: <20211116160403.4074052-6-maz@kernel.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/s390/kvm')
0 files changed, 0 insertions, 0 deletions