[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v1 00/14] Nested p2m: allow sharing between vCPUs



On 09/04/2017 09:14 AM, Sergey Dyasli wrote:
> Nested p2m (shadow EPT) is an object that stores memory address
> translations from L2 GPA directly to L0 HPA. This is achieved by
> combining together L1 EPT with L0 EPT during L2 EPT violations.
> 
> In the usual case, L1 uses the same EPTP value in VMCS12 for all vCPUs
> of a L2 guest. But unfortunately, in current Xen's implementation, each
> vCPU has its own n2pm object which cannot be shared with other vCPUs.
> This leads to the following issues if a nested guest has SMP:
> 
>     1. There will be multiple np2m objects (1 per nested vCPU) with
>        the same np2m_base (L1 EPTP value in VMCS12).
> 
>     2. Same EPT violations will be processed independently by each vCPU.
> 
>     3. Since MAX_NESTEDP2M is defined as 10, if a domain has more than
>        10 nested vCPUs, performance will be extremely degraded due to
>        constant np2m LRU list thrashing and np2m flushing.
> 
> This patch series makes it possible to share one np2m object between
> different vCPUs that have the same np2m_base. Sharing of np2m objects
> improves scalability of a domain from 10 nested vCPUs to 10 nested
> guests (with arbitrary number of vCPUs per guest).

Sergey,

With the exception the ordering issue in patch 7, I think this series is
largely correct.

However, the way the series was laid out made it fairly difficult to
understand what the code meant to be doing; it was often difficult to
see the forest for the trees, because changes were scattered across
several patches.  The worst of this was the dirty_cpumask / flushing
improvement, which was scattered across patches 5, 8, and 11.

In an effort to make sure I understood what was going on, I reorganized
the series in my own tree, merging many patches and re-writing the
commit messages in a format which makes it easier to verify the patch
(What's the situation, why is that a problem, what do we do to fix it).
I'll send this series as v2 -- could you read through it and make sure
I've gotten the main point of all the patches?

Thanks,
 -George


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.