Re: [PATCH v2 0/2] KVM: Allocate small memslot metadata with kvzalloc()

From: Sean Christopherson

Date: Fri Nov 13 2026 - 11:18:19 EST


On Thu, 05 Nov 2026 00:01:25 +0000, Fred Griffoul wrote:
> From: Fred Griffoul <fgriffo@xxxxxxxxxxxx>
>
> __vcalloc() makes every memslot metadata allocation at least one page,
> so small memslots waste most of their lpage_info and dirty bitmap, and
> memslots below 512 GiB waste most of a page on their 1 GiB lpage_info.
> Mushahid's patch [1] switched those arrays to kvcalloc(), and Sean
> suggested dedicated helpers for memslot metadata with a pivot that makes
> sense for KVM instead [2].
>
> [...]

Applied to kvm-x86 generic, thanks!

[1/2] KVM: Add helpers to allocate memslot metadata
https://github.com/kvm-x86/linux/commit/bd0ac62e682f
[2/2] KVM: Use kvzalloc() for memslot metadata that fits in a slab bucket
https://github.com/kvm-x86/linux/commit/7a6d1004c2c5

--
https://github.com/kvm-x86/linux/tree/next