[RFC PATCH v2 12/26] KVM: arm64: Introduce a Hyp buddy page allocator
Quentin Perret
qperret at google.com
Thu Feb 4 13:24:24 EST 2021
On Thursday 04 Feb 2021 at 18:13:18 (+0000), Will Deacon wrote:
> I was going from memory, but the loop in __hyp_alloc_pages() searches up to
> HYP_MAX_ORDER, whereas this is _never_ going to succeed beyond some per-pool
> order determined by the size of the pool. But I doubt it matters -- I
> thought we did more than just check a list.
Ah, I see -- I was looking at the __hyp_attach_page() loop.
I think it's a good point, I should be able to figure out a max order
based on the size and alignment of the pool, and cache that in struct
hyp_pool to optimize cases where this is < HYP_MAX_ORDER.
Should be easy enough, I'll see what I can do in v3.
Thanks!
Quentin
More information about the linux-arm-kernel
mailing list