WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] libxl: added libxl compatibility with physical b

To: Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] libxl: added libxl compatibility with physical backend file for NetBSD
From: Roger Pau Monné <roger.pau@xxxxxxxxxxxxx>
Date: Fri, 29 Jul 2011 13:02:06 +0200
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 29 Jul 2011 04:08:09 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=Z8hCmVRPEiliynHQ67Pd9ALoNnXkH4aw4rS+BIvPqko=; b=PGaj4JVl5Nx9kFSEdF8r6ViXWFPq5WkAa2kfrqNBvZCOFiPL+C99jCjyVafCzcwQUk NzN6qFT8D5b3IxKD5JJXZKCcuh4VD/DyOUIWqUGbW9FaO7DHie4WXWXWG+R77iTMXuJ4 XErU3jbDEzck+G845SZsdUTqjAEn9yy5aPg2k=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1311361654.4027.71.camel@xxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <c3d4cad0fc2d34c8346c.1311356214@loki> <1311350491.12772.96.camel@xxxxxxxxxxxxxxxxxxxxxx> <CAPLaKK6r=rrysoQQFddyxh-GjMRX_CHaL_TV9AT5Ub50-wViCA@xxxxxxxxxxxxxx> <1311361654.4027.71.camel@xxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
> The hotplugs scripts are called from a udev rule but the event is
> triggered (asynchronously) by the backend driver based upon the changing
> state node, so ultimately they are triggered from the same xenstore
> watch.
>
> It's certainly possible that the sequencing is different between Linux
> and NetBSD or that in the Linux case there is some interlock (deliberate
> or otherwise) between the kernel side and the hotplug script side which
> saves our bacon.
>
> Who is responsible for driving the backend xenstore state machine under
> NetBSD? It doesn't look like xenbackendd (which just reacts to state
> changes).

xbdback is responsible for changing the state of xenstore, it performs
the state change and attaches devices to guests. It is pretty similar
to xenbackendd, but runs in the kernel space.

> Ah, that may well be it. I had thought that vnd was all in kernel but
> now I see that it is setup and torn down in the hotplug script, much
> like for loopback on Linux with xend.

It's basically the same strategy as the one used on Linux with loopback devices

> On Linux we were able to make the simplifying assumption of not handling
> this for phy devices because we had blktap to fall back on. NetBSD
> doesn't currently have that option.

Well, I'm trying to implement something similar to blktap2 in NetBSD,
but all in user space, using pud, a driver that enables the
implementation of block and character device drivers as userspace
daemons (something similar to nbd in Linux I think), I've also looked
into FUSE, but it required the use of vnd/loop device for the image to
be presented as a block device.

> I think part of the problem is that the vbd lifecycle and the backing
> device's lifecycle (vnd in this case, but could also be an iscsi login
> for example) are somewhat entwined via the hotplug scripts etc when
> really they should be layered and somewhat independent.
>
> Ian Jackson has the best handle on this stuff and I know he has plans to
> move the block script callout stuff forward to better support various
> more complex block device types, integrate better with the toolstack and
> generally rationalise the existing interfaces etc so I'd like to hear
> what he thinks before I suggesting any particular avenue of attack to
> this problem. He's travelling right now but may be online intermittently
> next week (we're both going to be at the Debian conference in Banja
> Luka), I think he's back properly the week after that though.
>
> I'm travelling next week and on vacation the week after. But I need to
> get onto this soon so it is done for Xen 4.2, since it will an API
> incompatible change to libxl and we are hoping to declare the API stable
> at that point.

Well, I hope you had a good trip, I will be off next week, and won't
be back until the 10th of August, so we will have to leave this on a
hold until then, but I'm not going to let it die.

> Have you considered coming to the Munich Xen.org hackathon in September?
> http://wiki.xen.org/xenwiki/MUC_2011_hackathon. That would be a great
> opportunity to work through some of these issues and ensure that the
> future direction of libxl's handling of this stuff works for NetBSD as
> well as Linux.

Thanks for the offer, I would really like to come, but I have some
other stuff I also have to attend, so I don't think I will be able to
come (it took me so long to answer this email because I was trying to
come to the hackathon). Anyway, I hope I can come to future
meetings/hackathons! I don't know if Christoph will we able to attend,
if so he may be able to clarify some of the doubts about NetBSD device
handling.

Thanks and regards, Roger.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel