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

Re: [Xen-devel] [PATCH v2] x86/domain_page: implement pure per-vCPU mapping infrastructure



On Fri, 2020-02-21 at 13:02 +0000, Andrew Cooper wrote:
> On 21/02/2020 12:52, Xia, Hongyan wrote:
> > On Fri, 2020-02-21 at 11:50 +0000, Wei Liu wrote:
> > > Given that:
> > > 
> > > 1. mapcache_domain is now a structure with only one member.
> > > 2. ents is a constant throughout domain's lifecycle.
> > > 
> > > You can replace mapcache_domain with a boolean --
> > > mapcache_mapping_populated (?) in arch.pv.
> > > 
> > > If I'm not mistaken, the size of the mapping is derived from the
> > > vcpu
> > > being initialised, so a further improvement is to lift the
> > > mapping
> > > creation out of mapcache_vcpu_init.
> > 
> > But you can just XEN_DOMCTL_max_vcpus on a running domain to
> > increase
> > its max_vcpus count, so that ents is not constant?
> 
> The comments suggest that, but it has never been implemented, and I'm
> in
> the process of purging the ability.
> 
> Already now, max is passed into domain_create, and the
> XEN_DOMCTL_max_vcpus call has to exactly match what was passed to
> create.  As soon as the {domain,vcpu}_destroy() functions become
> properly idempotent (so we can unwind from midway through after an
> -ENOMEM/etc), XEN_DOMCTL_max_vcpus will be dropped completely.
> 
> d->max_cpus is set early during construction, and remains constant
> for
> the lifetime of the domain.

Thanks for the clarification. This simplifies things quite a bit.

Hongyan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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