[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 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.

Anyway, I'll go that way for now.

Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

Attachment: signature.asc
Description: PGP signature

Xen-devel mailing list



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