As part of this change, the metadata bitmap size is increased from 512 bytes to PAGE_SIZE to align with the page-based allocations from the buddy system.
The implication of this change is that preservation metadata becomes less memory-efficient when preserved pages are sparse. Mainly because if only one bit is set in the bitmap, now 4k bytes of memory is used instead of 512 bytes.
It is hard to say what difference this makes in practice without sampling real workloads, but perhaps still worth mentioning in the commit message?
Forgot to reply to the other part:
I agree, however, I suspect the implication is going to be minimal, it is strange to preserve fragmented state and expect a fast reboot. Most likely, we are going to be optimizing the preservation pools, such as using 1G order pages for guest memory.
Also, we are moving toward preserving 4K bitmaps as part of the Stateless KHO patch series, so I think we will make this change anyway, as part of this fix or as part of transitioning to radix-tree stateless KHO.
Reviewed-by: Pratyush Yadav pratyush@kernel.org
Thank you. Pasha