xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Andre Przywara <andre.przywara@amd.com>
To: Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
	Vincent Hanquez <vincent.hanquez@eu.citrix.com>,
	Keir Fraser <keir.fraser@eu.citrix.com>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: Re: [PATCH 3/4] libxl: add version_info function [and 1 more messages]
Date: Mon, 19 Apr 2010 22:43:14 +0200	[thread overview]
Message-ID: <4BCCC062.5080008@amd.com> (raw)
In-Reply-To: <19404.30856.176804.871256@mariner.uk.xensource.com>

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

  parent reply	other threads:[~2010-04-19 20:43 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-18 21:17 [PATCH 0/4] Add "xl info" command Andre Przywara
2010-04-18 21:23 ` [PATCH 1/4] libxl: extend physinfo structure Andre Przywara
2010-04-19  7:50   ` Vincent Hanquez
2010-04-19 15:27     ` [PATCH 1/4] libxl: extend physinfo structure [and 1 more messages] Ian Jackson
2010-04-18 21:25 ` [PATCH 2/4] libxl: add sched_get_id function Andre Przywara
2010-04-19  7:50   ` Vincent Hanquez
2010-04-19 15:29     ` [PATCH 2/4] libxl: add sched_get_id function [and 1 more messages] Ian Jackson
2010-04-18 21:26 ` [PATCH 3/4] libxl: add version_info function Andre Przywara
2010-04-19  8:08   ` Vincent Hanquez
2010-04-19 15:36     ` [PATCH 3/4] libxl: add version_info function [and 1 more messages] Ian Jackson
2010-04-19 16:07       ` Vincent Hanquez
2010-04-19 16:21         ` Ian Jackson
2010-04-19 16:41           ` Vincent Hanquez
2010-04-19 20:43       ` Andre Przywara [this message]
2010-04-20  8:36         ` Vincent Hanquez
2010-04-21 12:10           ` Andre Przywara
2010-04-21 12:53             ` Vincent Hanquez
2010-04-18 21:28 ` [PATCH 4/4] xl: add "xl info" command Andre Przywara
2010-04-19 15:38   ` 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=4BCCC062.5080008@amd.com \
    --to=andre.przywara@amd.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=keir.fraser@eu.citrix.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=vincent.hanquez@eu.citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /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).