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


[Xen-devel] Re: [PATCH 1 of 5] xentrace: fix t_info_pages calculation fo

To: George Dunlap <george.dunlap@xxxxxxxxxxxxx>
Subject: [Xen-devel] Re: [PATCH 1 of 5] xentrace: fix t_info_pages calculation for the default case
From: Olaf Hering <olaf@xxxxxxxxx>
Date: Thu, 24 Mar 2011 17:03:27 +0100
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Thu, 24 Mar 2011 09:05:25 -0700
Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; t=1300982610; l=726; s=domk; d=aepfle.de; h=In-Reply-To:Content-Type:MIME-Version:References:Subject:Cc:To:From: Date:X-RZG-CLASS-ID:X-RZG-AUTH; bh=t19I0az6TC0JoQ/LXOL86LVizUs=; b=jnK2YJHYmvPfTH1g62AseBEVDVao6O4kUH6aZ1VhXWHm/enm+t002ctd1GYfrhD1qGq 7Od1JayWxj+o5uDCee9uod1gdeAwRR7htU4xvzt4iXghPFMODhco9ZO3ISj3GRHyHjKQk tGmTB5tJdBau8qE5Qw4Pz7FbCQ2J2h7Nkf0=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1300981626.2648.33.camel@silas>
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: <patchbomb.1300902861@localhost> <14ac28e4656d0c235c5e.1300902862@localhost> <1300981626.2648.33.camel@silas>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.21 (2010-09-15)
On Thu, Mar 24, George Dunlap wrote:

> Then it's really clear when looking at it what the inputs and outputs of
> each line is supposed to be.


lets not overdo things. The formula I came up with, based on the initial
code, is even slightly incorrect. It may allocate more than needed.
Each cpu has some pages/mfns stored as uint32_t. That list is stored
with an offset at tinfo. So its more like:
num_online_cpus() * pages * sizeof(uint32_t) + t_info_first_offset;
And that number of bytes is now correctly converted to pages with

        t_info_words = num_online_cpus() * pages * sizeof(uint32_t);
        t_info_pages = PFN_UP(t_info_first_offset + t_info_words);

(Modulo things I missed.)


Xen-devel mailing list