|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [Xen-devel] Re: [PATCH 1 of 5] xentrace: fix t_info_pages calculatio
On 24/03/2011 15:47, "George Dunlap" <george.dunlap@xxxxxxxxxxxxx> wrote:
> On Wed, 2011-03-23 at 17:54 +0000, Olaf Hering wrote:
>> - t_info_pages = num_online_cpus() * pages + t_info_first_offset;
>> - t_info_pages *= sizeof(uint32_t);
>> - t_info_pages /= PAGE_SIZE;
>> - if ( t_info_pages % PAGE_SIZE )
>> - t_info_pages++;
>> + t_info_bytes = num_online_cpus() * pages + t_info_first_offset;
>> + t_info_bytes *= sizeof(uint32_t);
>> + t_info_pages = PFN_UP(t_info_bytes);
>
> Hmm, still not quite following the spirit of the idea -- that
> t_info_bytes should be bytes, not words (as it is in the first
> instance). I think I'd prefer making it one assignment:
>
> t_info_bytes = ( num_online_cpus() * pages + t_info_first_offset )
> * sizeof(uint32_t);
>
> But if you don't like that, to keep consistent, we should do this:
> t_info_words = num_online_cpus() * pages + t_info_first_offset;
> t_info_bytes = t_info_words * sizeof(uint32_t);
> t_info_pages = PFN_UP(t_info_bytes);
>
> Then it's really clear when looking at it what the inputs and outputs of
> each line is supposed to be.
I'll clean this up and apply the whole series.
-- Keir
> -George
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-devel] [PATCH 3 of 5] xentrace: remove gdprintk usage since they are not in guest context, (continued)
|
|
|
|
|