|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] Re: [PATCH 1 of 5] xentrace: fix t_info_pages calculation fo
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
|
|
|
|
|