xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: "Marek Marczykowski-Górecki" <marmarek@invisiblethingslab.com>
To: Wei Liu <wei.liu2@citrix.com>
Cc: xen-devel <xen-devel@lists.xen.org>,
	"Ian Jackson" <ian.jackson@eu.citrix.com>,
	"Roger Pau Monné" <roger.pau@citrix.com>
Subject: Re: libxl - avoid calling block script
Date: Fri, 23 Feb 2018 21:14:03 +0100	[thread overview]
Message-ID: <20180223201403.GJ2023@mail-itl> (raw)
In-Reply-To: <20180223182856.5vcmlc2msqvpl7ya@citrix.com>


[-- Attachment #1.1: Type: text/plain, Size: 2242 bytes --]

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 #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 157 bytes --]

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

  reply	other threads:[~2018-02-23 20:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-09  1:02 libxl - avoid calling block script Marek Marczykowski-Górecki
2018-02-09 10:55 ` Roger Pau Monné
2018-02-09 11:03   ` Roger Pau Monné
2018-02-09 11:35     ` Marek Marczykowski-Górecki
2018-02-23 18:28       ` Wei Liu
2018-02-23 20:14         ` Marek Marczykowski-Górecki [this message]
2018-02-26 10:11           ` Roger Pau Monné
2018-02-26 11:58       ` Ian Jackson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180223201403.GJ2023@mail-itl \
    --to=marmarek@invisiblethingslab.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=roger.pau@citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).