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] A question about libxl

To: "$BCzJ]ya(B" <sploving1@xxxxxxxxx>
Subject: Re: [Xen-devel] A question about libxl
From: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
Date: Fri, 4 Mar 2011 10:19:54 +0000
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 04 Mar 2011 02:20:59 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <AANLkTinPwTUOTs4D-RtsEWg9LwLMC_wMNOfBzJzYTkuw@xxxxxxxxxxxxxx>
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>
Organization: Citrix Systems, Inc.
References: <AANLkTinPwTUOTs4D-RtsEWg9LwLMC_wMNOfBzJzYTkuw@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Wed, 2011-03-02 at 14:56 +0000, $BCzJ]ya(B wrote:
> Hi all,
>      As we know,  we package the privcmd, evtchn, gntdev,etc, IOCTL
> interface to implement libxc, are there any docs about how to
> implement libxl? It says libxl relies on libxc, libxenguest, xenstore,
> etc, to 
> implement them, then why is libxl faster than libxc sometimes?(for
> example, "xl list" and "xm list") . 

You aren't really comparing apples to apples here and the relationship
between libxc and libxl is not what you appear to think it is.

Perhaps it will help to describe the various components:

libxc is a low-level library which contains e.g. thin wrappers for
making hypercalls, the internal mechanics of save/restore etc.

libxl is implemented using libxc (as well as libxenstore and some
others) and provides a higher level interface for toolstack authors, it
contains e.g. functions to create and build entire domains, functions to
add a network device to a domain etc.

xend is a toolstack daemon implemented using python bindings to libxc
(as well as libxenstore and some others). In the future we hope it will
switch to using python bindings to libxl instead as libxl is intended to
be a common library for all toolstacks. xend provides an RPC interface
which allows you to build entire domains, add network devices to a
domain, fully manage domain lifecycles etc.

xm is a command line interface to xend, e.g. it makes RPC calls to xend
in order to do the things described above.

xl is a lightweight toolstack implemented in C using libxl. It is
intended as a drop in replacement for the xm interface to xend.

So xl is a lightweight toolstack which performs things like "xl list"
pretty directly via libxl, whereas xm is a interface to an RPC mechanism
to a toolstack daemon which is why "xm list" is not going to be as fast
as "xl list".

For completeness: xapi, the XCP toolstack, is a toolstack daemon
implemented largely in ocaml using the ocaml bindings to libxc (as well
as libxenstore and some others etc). In the future we hope it will
switch to using ocaml bindings to libxl instead as libxl is intended to
be a common library for all toolstacks. xapi provides the XenAPI RPC
interface (different to the xend RPC interface) which allows you to
build entire domains, add network devices to a domain, fully manage
domain lifecycles etc.

xe is the command line interface to XenAPI, e.g. it mapes RPC calls to
xapi etc etc.

Ian.


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

<Prev in Thread] Current Thread [Next in Thread>