[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [Patch] Fixing 1G page allocation algorithm in libxc


  • To: xen-devel@xxxxxxxxxxxxxxxxxxx, Keir Fraser <keir@xxxxxxx>
  • From: Haitao Shan <maillists.shan@xxxxxxxxx>
  • Date: Fri, 28 Jan 2011 12:40:46 +0800
  • Cc:
  • Delivery-date: Thu, 27 Jan 2011 20:41:39 -0800
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=gTkeKqRevIvsJjnjQDy3ODCVVJ0p2iArzuUa6GFdjLKixI9XU4Rs+AVOQ0xt88n2+1 LJkOff1Aghz4OIdAjg3WfegUFSzcsfeGzPht0+UEuny23VoWC42Ycdc2PwY4Z+Vac8B0 PgQ3tut5WUtevV/Q2vxEF6t/jYaVb++Je0pXc=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

Hi, Keir,

This patch fixes 1G page allocation algorithm in libxc.

Currently, cur_pages (which is used as index into page_array for
fetching gfns) is used to judge whether it is proper here to allocated
1G pages. However, cur_pages == page_array[cur_pages] only holds true
when it is below 4G. When it is above 4G, page_array[cur_pages] -
cur_pages = 256M.
As a result, when guest has 10G memory, 8 1G-pages are allocated. But
only 2 of them have their corresponding gfns 1G aligned. The other 6
are forced to split to 2M pages, as their starting gfns are 4G+256M,
5G+256M .................

Inside the patch, true gfns are used instead of cur_pages to fix this issue.

Signed-off-by: Shan Haitao <haitao.shan@xxxxxxxxx>

Shan Haitao

Attachment: 1Gfix.patch
Description: Binary data

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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.