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

[Xen-devel] Re: [PATCH 1 of 5] xentrace: fix t_info_pages calculation for the default case



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.

George,

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
PFN_UP. 

        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.)

Olaf

_______________________________________________
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®.