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 3/4] libxl: add version_info function [and 1 more

To: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH 3/4] libxl: add version_info function [and 1 more messages]
From: Andre Przywara <andre.przywara@xxxxxxx>
Date: Mon, 19 Apr 2010 22:43:14 +0200
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Vincent Hanquez <vincent.hanquez@xxxxxxxxxxxxx>, Keir Fraser <keir.fraser@xxxxxxxxxxxxx>, Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Delivery-date: Mon, 19 Apr 2010 13:44:35 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <19404.30856.176804.871256@xxxxxxxxxxxxxxxxxxxxxxxx>
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: <4BCB76FD.1020103@xxxxxxx> <4BCB791E.7000204@xxxxxxx> <4BCC0F86.8090707@xxxxxxxxxxxxx> <19404.30856.176804.871256@xxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.18 (X11/20081105)
Ian Jackson wrote:
Andre Przywara writes ("[Xen-devel] [PATCH 3/4] libxl: add version_info 
function"):
Xen provides a xen_version hypercall to query the values of several
interesting things (like hypervisor version, commandline used,
actual changeset, etc.). Create a user-friendly and efficient
wrapper around the libxc function to provide values for xl info output.

As Vincent says, I think the query mask is overkill.  I would suggeset
just doing without it, and always acquire and return all the
information.  Ie, do away with query_mask and LIBXL_VERSION_FOO_MASK
and the correspondings ifs.
I am not fully convinced of this. There is quite a lot of information copied (up to 4KB), and some fields (like pagesize or the version numbers) are just plain integers. And this approach just propagates the underlying design. In the xl info implementation I used this feature to just get the pagesize. One could think of just querying the version number, too. If you don't like the additional parameter, what about a wrapping macro, then? I don't see the problem with the complexity, though, as it is hidden inside the library. I can use libxl_sprintf function to get rid of the free() function, but I personally don't like the idea of accumulated mallocs much, left alone the "hidden" free operation.

I will incorporate your other comments.

Thanks for the review!

Regards,
Andre.

--
Andre Przywara
AMD-Operating System Research Center (OSRC), Dresden, Germany
Tel: +49 351 488-3567-12


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

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