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] 32/64-bit hypercall interface - padding

To: "Ian Pratt" <m+Ian.Pratt@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] 32/64-bit hypercall interface - padding
From: Hollis Blanchard <hollisb@xxxxxxxxxx>
Date: Mon, 3 Oct 2005 14:16:10 -0500
Cc: Jimi Xenidis <jimix@xxxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 03 Oct 2005 19:14:45 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <A95E2296287EAD4EB592B5DEEFCE0E9D32E0D9@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: IBM Linux Technology Center
References: <A95E2296287EAD4EB592B5DEEFCE0E9D32E0D9@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.8.2
On Sunday 02 October 2005 16:21, Ian Pratt wrote:
> The hypervisor to guest interface is obviously performance critical, and
> just changing everything into a 64 bit quantity certainly would not make
> sense from a memory usage, cache footprint and instruction count point
> of view. Looking through the public guest interface, the current use of
> 'long' to get 32 bit quantities on x86_32 and 64 on x86_64 actually
> makes good sense.
>
> However, I don't think we should be using 'long' directly in public
> headers as it makes it harder to override. For example, if we ever
> support 32 bit guests on a 64 bit hypervisor we may want to use multiple
> compilation to build a compatibility layer or such like. We should
> probably typedef something like 'ureg' that we could override as
> appropriate. This would also enable the Power folks to build a 32 bit
> binary tools for a 64 bit hypervisor.
>
> [I think I favour using a single typedef like 'ureg' rather than coming
> up coming up with different names for all of the different uses of
> 'long' as the latter seems faorly pointless]
>
> However, since we're not actually changing the size of any types, this
> change isn't essential to rush through before 3.0, though it might be
> nice as it should be very low risk.

I'm working on this patch now.

However, ureg_t alone will not alleviate the padding issues that the dom0_ops 
structures have. Since we're insisting on using types that change size (and 
alignment requirements), only reordering the fields will help there. Poor 
structure layout impacts memory usage and cache footprint, as you mention 
above.

-- 
Hollis Blanchard
IBM Linux Technology Center

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