Hi Anders,
Please see my reply inline below...
On Wed, May 30, 2018 at 9:24 PM, Anders Kallerdahl <
and...@kallerdahl.se> wrote:
> Hi Anup,
>
> thanks for the clarification.
>
> So vCPU can only be mapped to one Core?
Generally but not necessary. If we have fewer cores in underlying host
system then
we endup running multiple VCPUs on same host core.
> And from this model point of view a CPU does not really exists? (i mean, the
> vCPU maps directly to the core)
Xvisor manages the host cores. In fact, Xvisor is a SMP kernel itself.
When designing Guest/VM, we should only consider the requirements of the
SW that is going to run on Guest/VM. In other words, come up with right
sized Guests/VMs for your use-case and then fit Guests/VMs on your host
system.
>
> Let me give an theoretical example. Lets assume we have a Cortex A57 with 8
> cores.
> I have one Android OS and one Linux OS and one FreeRTOS
> I want to give power to Android and therefore it will need 4 cores
> the Linux 3 cores
> FreeRtos 1 core
> Android will be mapped to 4 vCPUs, Linux to 3 vCPUs, and FreeRTOS to 1 vCPU?
Yes, here your Guests/VMs easily get separate host cores because underlying
host system has total 8 cores.
>
> Another example would be if we have a borad with 2 Cortex A57 with 4 cores
> each.
> This exemplifies my second question above.
> Does it make sense to map for example Android OS to 2 CPUs (4 cores on one
> CPU, and 2 cores on the other CPU). And then Linux on the two left over
> cores on the second CPU?
> Or this use-case is not in scope of the Xvisor?
>
Xvisor is not restricted in anyway by number of cores and clusters in underlying
host system. Users are free to come-up with variety of configuration. The most
important performance tuning in real-life system would be how Guests/VMs are
pinned to different host cores considering cache hierarchies and clusters.
In second example, what I understood is that you have host system with
2 clusters where each cluster has 4 cores. Now if you assign Android OS
2 cores from each cluster then certainly Android OS will get better performance
because it will use L2-cache of both clusters. But this will be at cost of
Linux OS and FreeRTOS because they will be sharing L2-cache with
Android OS on both clusters. Again, there is no restriction from Xvisor
side for this configuration.
We should consider fairness in sharing of caches when coming-up core
assignments for Guests/VMs so that overall system performance remains
good in all conditions.
Regards,
Anup