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/
Home Products Support Community News


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

To: Haitao Shan <maillists.shan@xxxxxxxxx>
Subject: Re: [Xen-devel] [Patch] Fixing 1G page allocation algorithm in libxc
From: George Dunlap <George.Dunlap@xxxxxxxxxxxxx>
Date: Fri, 28 Jan 2011 10:33:32 +0000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, Keir Fraser <keir@xxxxxxx>
Delivery-date: Fri, 28 Jan 2011 02:34:19 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=euyHChnaB+g07GeLX2TREVrWAnL7NgH8otEaacn0m8Q=; b=n5LafjpDEOqEwmHxOODsOwNaeCL++LiGSOO93Spkr0GUvxR649I2D9g6qA4AH6h0P/ p/Q/5ymylIYVbIN4NrG3Xp3tybei82eJUAoU+2J9njzHU/OlJ1eFruI2sNfo7lLsLBgN q2TWbfRzhbE3ly0QGSSdpV/mQ5gky9UzmIDR8=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=Kyk6/QMuhwbrAP85e7Q0Md+J0LYxTmqxFEKJJyktWWiNBUdhZynkk3UX4/sDSuzXYv ViKJgZ0C2HtnBAR7ZB1kmrzAtZlxlcdceXJoyTRhgFJivpkdRBbwOK2o88AEIYL83hGJ DLd8JBjkMJexK6OHh+oQt9tQ/pqVfa1VGChgA=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <AANLkTikyGq_4kOMT23w370Ks-jkMwr2-4iQbsMsFc3-Z@xxxxxxxxxxxxxx>
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>
References: <AANLkTikyGq_4kOMT23w370Ks-jkMwr2-4iQbsMsFc3-Z@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Good catch.  Thanks!

Acked-by: George Dunlap <george.dunlap@xxxxxxxxxx>


On Fri, Jan 28, 2011 at 4:40 AM, Haitao Shan <maillists.shan@xxxxxxxxx> wrote:
> 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
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel

Xen-devel mailing list

<Prev in Thread] Current Thread [Next in Thread>