On Friday 20 February 2009 00:26:21 Julian Elischer wrote:
> Julian Elischer wrote:
> > I've been doing performance testing on the 'non-vimage'
> > 'structified' case VS the original 'globals' case and have not been
> > able to see any really significant differences (though I have seen
> > very slight differences in the distribution of results).
> >
> > SO I think we are in the position of moving forward to the next
> > steps.
> >
> > I think that just means checking in the rest of the vimage tree
> > from what I have seen.
> >
> > Then  we can play with it a bit and then proceed to the
> > jail/vimage merge stuff that Jamie (and bz) are working on.
> >
> > One thing I'd like to do is make the following changes:
> >
> > 1/ evaluate the ordering of the items in the vimage structures to
> > see if there are items that should be clustered for cache reasons.
> >
> > 2/ remove all sub structures from the vimage structures
> > and replace them with pointers. This is because puting them in
> > directly in the vimage structures will make our lives harder due to
> > ABI issues. If they are independently allocated (*) then we don't
> > need to worry about them changing in size.
> for example, the ipsec struct starts with:
>          int                     _ipsec_debug;
>          struct  ipsecstat       _ipsec4stat;
>          struct  secpolicy       _ip4_def_policy;
>          int                     _ip4_esp_trans_deflev;
>          int                     _ip4_esp_net_deflev;
> This effectively fixes the size of the ipsecstat and secpolicy
> structures. I would like instead to have:
>          int                     _ipsec_debug;
>          struct  ipsecstat       *_ipsec4stat;
>          struct  secpolicy       *_ip4_def_policy;
>          int                     _ip4_esp_trans_deflev;
>          int                     _ip4_esp_net_deflev;
> and have the initializer function allocate those separately.
> > (*) actually they could still be allocated as a blob but we would
> > access them as if they are separate.
> >
> > comments?

I'm working on distilling the initializer functions from vimage to 
vimage-commit2 branch, and this will probably be a cause of enough 
controversy for itself, so that I'd propose to wait a few more days 
before engaging in other changes / optimizations.  With my pointy-hat 
for losing lots of time on, I still think that so far we have been more 
or less successfull in merging bits over to svn without causing major 
damage to other people, so perhaps it might sense to continue one step 
at the time.

Of course, I agree that reducing the impact of changes in random 
structures to the layout of vnet_* containers by using pointers instead 
of embedded structs would certainly be an improvement in ABI 
maintenance terms, but we shouldn't loose the performance perspective 
in mind, given that we've already introduced an additional level of 

Ordering of items in vnet_ containers is definitely something that could 
and should be played with sooner than later, though I can't / won't 
promise to spend significant amount of time on that in the next few 
weeks :)

freebsd-virtualization@freebsd.org mailing list
To unsubscribe, send any mail to 

Reply via email to