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] Why gnttab_grant_foreign_access() can only grantaccess f

To: "Ian Pratt" <m+Ian.Pratt@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] Why gnttab_grant_foreign_access() can only grantaccess for one page?
From: "Lily Huang" <ushuanglily@xxxxxxxxx>
Date: Fri, 7 Jul 2006 12:40:20 -0400
Cc: Randy Thelen <rthelen@xxxxxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 07 Jul 2006 09:40:44 -0700
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=t6sNXHWRbeA+ktxdBOD2ZGIzcUlLahpVdSGdRK8x3eSxXBG5Og+Sv3QV7pjK6u7pVoEgKt1bGs6lwtdHBVWGB9tEpB1XVgS6XREOTn8lWZNLh11He/ifEy9kdBmJRQzKKvuTZH+Alsj7hVMgVSvW5UjIED0Q//U7Xn5uKOooQd8=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <A95E2296287EAD4EB592B5DEEFCE0E9D571FF1@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>
References: <A95E2296287EAD4EB592B5DEEFCE0E9D571FF1@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
In my case, I often need to allow client domain to remap 16 pages. I don't have exact number of the frequency, but it should be pretty high because I need to allow
two domains to share bulk of data frequently.

I just read the source code. gnttab_grant_foreign_access() seems to just set some data in an in-memory structure "shared".  No hypercall is needed here. Right?
If so, whether calling this function in a batch mode does not make big difference to me. I thought a
gnttab_grant_foreign_access() will cause a hypercall and context switch, then
whether we can do batch granting will be important to performance.

Ian, you said "
grant tables are not typically used to map machine contiguous regions". Does Xen provide any mechanism to map contiguous regions?

Another question: Grant table currently seems to only allow 1024 entries, which means a domain may grant remote access on at most 1024 pages. However, this may not be enough in some cases. For example, in my case, I
need to allow a backend VM to share many pages with frontend. I can certainly change the xen code to make the grant table larger. But does Xen has a better way to handle this situation?

thanks,
lily

On 7/7/06, Ian Pratt <m+Ian.Pratt@xxxxxxxxxxxx> wrote:
> Lily Huang wrote:
>
> > THis seems to be less efficient. Why cannot we allow this function
> > to grant access for mulitiple pages just remap function?
>
> With what frequency are multiple page grants requested?

You can always use multicalls for batches. In the current usage
scenarios, grant tables are not typically used to map machine contiguous
regions.

Ian

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