From: Keir Fraser <keir.xen@gmail.com>
To: George Dunlap <george.dunlap@eu.citrix.com>,
Olaf Hering <olaf@aepfle.de>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: Re: [PATCH 1 of 5] xentrace: fix t_info_pages calculation for the default case
Date: Thu, 24 Mar 2011 16:04:12 +0000 [thread overview]
Message-ID: <C9B11BFC.155AB%keir.xen@gmail.com> (raw)
In-Reply-To: <1300981626.2648.33.camel@silas>
On 24/03/2011 15:47, "George Dunlap" <george.dunlap@eu.citrix.com> 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@lists.xensource.com
> http://lists.xensource.com/xen-devel
next prev parent reply other threads:[~2011-03-24 16:04 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-23 17:54 [PATCH 0 of 5] xentrace updates Olaf Hering
2011-03-23 17:54 ` [PATCH 1 of 5] xentrace: fix t_info_pages calculation for the default case Olaf Hering
2011-03-24 12:09 ` Christoph Egger
2011-03-24 12:18 ` Christoph Egger
2011-03-24 12:34 ` Keir Fraser
2011-03-24 15:47 ` George Dunlap
2011-03-24 16:03 ` Olaf Hering
2011-03-24 16:04 ` Keir Fraser [this message]
2011-03-23 17:54 ` [PATCH 2 of 5] xentrace: print calculated numbers in calculate_tbuf_size() Olaf Hering
2011-03-23 17:54 ` [PATCH 3 of 5] xentrace: remove gdprintk usage since they are not in guest context Olaf Hering
2011-03-23 17:54 ` [PATCH 4 of 5] xentrace: update comments Olaf Hering
2011-03-23 17:54 ` [PATCH 5 of 5] xentrace: use consistent printk prefix Olaf Hering
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=C9B11BFC.155AB%keir.xen@gmail.com \
--to=keir.xen@gmail.com \
--cc=george.dunlap@eu.citrix.com \
--cc=olaf@aepfle.de \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).