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

Re: [Xen-devel] libxl - avoid calling block script



On Fri, Feb 23, 2018 at 09:14:03PM +0100, Marek Marczykowski-Górecki wrote:
> On Fri, Feb 23, 2018 at 06:28:56PM +0000, Wei Liu wrote:
> > On Fri, Feb 09, 2018 at 12:35:13PM +0100, Marek Marczykowski-Górecki wrote:
> > > On Fri, Feb 09, 2018 at 11:03:55AM +0000, Roger Pau Monné wrote:
> > > > Really adding Ian and Wei.
> > > > 
> > > > On Fri, Feb 09, 2018 at 10:55:24AM +0000, Roger Pau Monné wrote:
> > > > > So the problem is creation time for domains that have quite a lot of
> > > > > disks attached. Adding Ian and Wei who know more about the async
> > > > > dispatch system, but I think (at least from a technical PoV) it
> > > > > should be possible to parallelize device attachment and thus hotplug
> > > > > script execution. Devices are independent from each other.
> > > 
> > > In theory yes, but in practice block script (at least on Linux) takes a
> > > lock and serialize execution...
> > > 
> > > > > Also the Linux hotplug scripts in general seem extremely convoluted,
> > > > > I'm not sure whether we could gain some speed there just by
> > > > > simplification.
> > > 
> > > Well, we're comparing a bunch of fork+exec(), including starting bash
> > > (default /bin/sh on most systems), with just a single stat() call...
> > > Handling scripts in libxl itself also takes some time (in my case libxl
> > > live in libvirt, which may or may not have an impact). For a domU with
> > > 4 disks, getting rid of hotplug scripts saved about 2s of startup time.
> > > 
> > 
> > Sorry for the late reply.
> > 
> > If you really don't want block scripts, can you not specify a script
> > that only does "exit 0"? That seems to be easier than modifying libxl
> > and it is also useable in older versions of Xen.
> 
> But this is only one part of the picture. Something needs to set
> physical-device xenstore entry. Libxl did that before, but it was
> removed (see original message in this thread). I may write alternative
> simplified block script for such case and measure performance of it, but
> this feels overly complex, especially when libxl already have everything
> it needs to quickly fill that xenstore entry.

Keep in mind hotplug scripts can be written in any language, they
don't need to be shell scripts. They are written in shell ATM because
it's easier to modify, but I think it would be perfectly normal to
instead have binary executables (ie: written in C) for performance
reasons.

Roger.

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