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] Re: [PATCH 1/3] xen/granttable: Introducing grant table

To: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Subject: Re: [Xen-devel] Re: [PATCH 1/3] xen/granttable: Introducing grant table V2 stucture
From: ANNIE LI <annie.li@xxxxxxxxxx>
Date: Fri, 18 Nov 2011 11:08:43 +0800
Cc: "jeremy@xxxxxxxx" <jeremy@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Ian Campbell <Ian.Campbell@xxxxxxxxxx>, "kurt.hackel@xxxxxxxxxx" <kurt.hackel@xxxxxxxxxx>, "linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>, Paul Durrant <Paul.Durrant@xxxxxxxxxx>
Delivery-date: Thu, 17 Nov 2011 19:09:53 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20111117162955.GA6758@xxxxxxxxxxxxxxxxxxx>
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: Oracle Corporation
References: <4EC3B62F.6080702@xxxxxxxxxx> <1321451304-13559-1-git-send-email-annie.li@xxxxxxxxxx> <1321526148.3664.263.camel@xxxxxxxxxxxxxxxxxxxxxx> <4EC53119.7060307@xxxxxxxxxx> <20111117162955.GA6758@xxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.23) Gecko/20110920 Thunderbird/3.1.15


On 2011-11-18 0:29, Konrad Rzeszutek Wilk wrote:
The more normal way to do this would be to make gnttab_interface a
pointer, define gnttab_v1_ops and do:
        gnttab_interface =&gnttab_v1_ops;
or if the pointer overhead is significant remove that and just do a
struct assignment:
        gnttab_interface = gnttab_v1_ops;

If using this way, we need two more public structures(gnttab_v1_ops
and gnttab_v2_ops), and two more functions to initialize those two
structures and then initialize the pointer gnttab_interface. It is
more complicated, am i missing something?
Why two functions? I agree on the structures - but they need not to be
public (they can be static).

For a good example look at how apic_physflat is done.
Thanks, static structure is simpler and clean. I am very glad to change that.:-)

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

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