[PATCH 13/17] KVM: PPC: Allow book3s_hv guests to use SMT processor modes

Paul Mackerras paulus at samba.org
Mon Apr 16 22:13:15 EST 2012


On Mon, Apr 16, 2012 at 11:45:44AM +0200, Alexander Graf wrote:

> While trying to trace down why some BookE systems were only able to
> do as many guest vcpus as there were host cpus available, we
> stumbled over this one. Is there any limitation on book3s_hv that
> would limit the available vcpus to configured host vcpus? Or could
> we just make this a static define like on x86?

There is no limitation.  I did it like that so that we would be able
to have a large number of vcpus on kernels configured for large
systems, while not using up large amounts of memory if the kernel is
configured for a small system.  The memory consumption is 8 bytes per
vcore in each struct kvm if book3s_hv is configured.

We can make it a fixed constant if you like, but then the question is
how do you choose that constant so as to allow us to have many vcpus
on large systems but still not waste too much memory on small systems.
Or it could be max(N, NR_CPUS) for a suitable N (e.g. 16 or 32).

Paul.


More information about the Linuxppc-dev mailing list