On Sun, 27 May 2018, speck for Andrew Cooper wrote: > On 27/05/2018 20:41, speck for Thomas Gleixner wrote: > > On Sun, 27 May 2018, speck for Linus Torvalds wrote: > >> Afaik, it mainly makes sense when there is no actual host OS at all, just > >> the bare-metal hypervisor used for partitioning resources, not scheduling > >> them. > > Right. That's what the Jailhouse hypervisor does. It's a zero vmexit setup. > > Jailhouse also has static assignment of resources, which means they can > arrange never to have two different VMs on the same sibling hyperthreads. Right. > They still need to disable hyperthreads or find a working > synchronisation algorithm for entry/exit, but they don't have the added > gang scheduling problem of ensuring that two hyperthreads are always > occupied by vcpus of the same VM. If Jailhouse exits, then there is something badly wrong and the guest will usually be terminated. There are a few odd cases where an exit actually is non fatal, but that should be fixable. > FWIW, my gut feeling at the moment is that the overhead of > synchronisation will outweigh disabling hyperthreading, but I'd like to > be proved wrong.  Others in the Xen community are looking to extend > shadow paging to be as performant as EPT is currently (because at that > point, the hypervisor control every PTE accessible to the pagewalk), and > again, I'd like to see this succeed, but my gut feeling is that it wont. It might be a viable solution for some of the common scenarios like mass hosting which tends to have a lot of single vcpu guests; there the overhead of shadow page tables might be less than the overhead of forcing siblings into idle and putting restrictions on load balancing etc. At least worth to investigate. Thanks, tglx