From: "Lily Huang" Subject: limit of grant table entries Date: Wed, 14 Jun 2006 04:05:00 -0400 Message-ID: <4d616cca0606140105k4b2859and8788b5eaa96cc80@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1753438400==" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Mime-version: 1.0 Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel List-Id: xen-devel@lists.xenproject.org --===============1753438400== Content-Type: multipart/alternative; boundary="----=_Part_100919_2485061.1150272300015" ------=_Part_100919_2485061.1150272300015 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline I tried to do gnttab_grant_foreign_access() to grant access of certain pages to another domain. But after my code runs for a while, I will not be able to do gnttab_grant_foreign_access() successfully and the error code is -ENOSPC. This seems to show that grant table has no free entries. At that time, I have call this function for 2039 times. But question is: sometimes, my system does need to grant a lot of pages to another domain, the limit of grant table seems to be a serious limitation. Another thing is: according to the xen code, 8 pages are used to store grant table entries. Each entry is 8 bytes long, so we should be able to allocate 4096 entries. Why I got error message when I only allocated 2039 entries? Can someone please give me an idea on how to fix this problem? Many thanks! -lily ------=_Part_100919_2485061.1150272300015 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline I tried to do gnttab_grant_foreign_access() to grant access of certain pages to another domain. But after my code runs for a while,
I will not be able to do gnttab_grant_foreign_access() successfully and the error code is -ENOSPC. This seems to show that grant table has no
free entries. At that time, I have call this function for 2039 times.

But question is: sometimes, my system does need to grant a lot of pages to another domain, the limit of grant table seems to be a serious limitation.

Another thing is: according to the xen code, 8 pages are used to store grant table entries. Each entry is 8 bytes long, so we should be able to allocate 4096
entries. Why I got error message when I only allocated 2039 entries?

Can someone please give me an idea on how to fix this problem? Many thanks!

-lily
------=_Part_100919_2485061.1150272300015-- --===============1753438400== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============1753438400==--