[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, Feb 21, 2020 at 12:52:07PM +0000, Xia, Hongyan wrote:
> On Fri, 2020-02-21 at 11:50 +0000, Wei Liu wrote:
> > On Thu, Feb 06, 2020 at 06:58:23PM +0000, Hongyan Xia wrote:
> > > ...
> > > 
> > > Benchmarks
> > > (baseline uses direct map instead of the mapcache in
> > > map_domain_page,
> > > old is the existing mapcache and new is after this patch):
> > > 
> > > Geekbench on a 32-vCPU guest,
> > > 
> > > performance drop     old        new
> > > single core         0.04%      0.18%
> > 
> > Do you know why the new mapcache has more overhead than the old one
> > in
> > the single core case?
> 
> To be honest I think this is within noise territory. The benchmarks
> were run 5 times, I can average over even more runs to confirm.

I would think so too, because there shouldn't be contention in single
vcpu case. I was a bit surprised to see the numbers.


[...]
> > > +        rc = create_perdomain_mapping(d, MAPCACHE_VIRT_START,
> > > ents,
> > >                                            NIL(l1_pgentry_t *),
> > > NULL);
> > >  
> > > -        /* Populate bit maps. */
> > > -        if ( !rc )
> > > -            rc = create_perdomain_mapping(d, (unsigned
> > > long)dcache->inuse,
> > > -                                          nr, NULL, NIL(struct
> > > page_info *));
> > > -        if ( !rc )
> > > -            rc = create_perdomain_mapping(d, (unsigned
> > > long)dcache->garbage,
> > > -                                          nr, NULL, NIL(struct
> > > page_info *));
> > > -
> > >          if ( rc )
> > >              return rc;
> > >  
> > >          dcache->entries = ents;
> > 
> > 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

I really meant "isn't" here.

> > 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?
> 

What Andrew said in his mail.

Wei.

_______________________________________________
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®.