xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Mats Petersson <mats.petersson@citrix.com>
To: xen-devel@lists.xen.org
Subject: Re: [PATCH 3 of 3] xen: sched_credit: add some tracing
Date: Wed, 5 Dec 2012 12:38:34 +0000	[thread overview]
Message-ID: <50BF404A.3000403@citrix.com> (raw)
In-Reply-To: <1354709754.21632.31.camel@Abyss>

On 05/12/12 12:15, Dario Faggioli wrote:
> On Wed, 2012-12-05 at 12:01 +0000, Ian Campbell wrote:
>>> As I tried to explain in the comment, I just wanted to avoid checking
>>> for !tb_init_done more than once, as this happens within a loop and, at
>>> least potentially, there may be more CPUs to tickle (and thus more calls
>>> to TRACE_1D).
>> If tb_init_done isn't marked volatile or anything like that isn't the
>> check hoisted out of the loop by the compiler?
>>
> Good point. As they're all macros, yes, I think that is something very
> likely to happen... Although, I haven't checked the generated code, I'll
> take a look. Thanks.
But if there is a call to an opaque function (any function the compiler 
doesn't "know" what it does in the current compile unit - or one where 
the compiler can't determine that the global variable isn't being 
modified, e.g. anything that uses pointers the compiler can't trace, 
etc) in between, the compiler must NOT move the actual read of a global 
variable. So it would be worth checking the compile output.

--
Mats
>
>>> I take this comment of yours as you not thinking that is
>>> something worthwhile, right? If so, I can definitely turn this into a
>>> "standard" TRACE_1D() call.
>> Or maybe consider __TRACE_1D and friends which omit the check?
>>
> Mmm... It may well be me, but my
>
> $ grep __TRACE xen/* -R
>
> does not show any results... What am I missing?
>
> Dario
>

      parent reply	other threads:[~2012-12-05 12:38 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-03 16:34 [PATCH 0 of 3] xen: sched_credit: fix tickling and add some tracing Dario Faggioli
2012-12-03 16:34 ` [PATCH 1 of 3] xen: sched_credit, improve tickling of idle CPUs Dario Faggioli
2012-12-03 17:12   ` Ian Campbell
2012-12-03 18:26     ` Dario Faggioli
2012-12-05 12:16   ` George Dunlap
2012-12-03 16:34 ` [PATCH 2 of 3] xen: tracing: introduce per-scheduler trace event IDs Dario Faggioli
2012-12-04 18:53   ` George Dunlap
2012-12-04 18:55     ` George Dunlap
2012-12-05 11:57     ` Dario Faggioli
2012-12-03 16:35 ` [PATCH 3 of 3] xen: sched_credit: add some tracing Dario Faggioli
2012-12-04 19:10   ` George Dunlap
2012-12-05 11:54     ` Dario Faggioli
2012-12-05 11:51       ` George Dunlap
2012-12-05 12:01       ` Ian Campbell
2012-12-05 12:15         ` Dario Faggioli
2012-12-05 12:20           ` Ian Campbell
2012-12-05 12:25             ` George Dunlap
2012-12-05 12:38           ` Mats Petersson [this message]

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=50BF404A.3000403@citrix.com \
    --to=mats.petersson@citrix.com \
    --cc=xen-devel@lists.xen.org \
    /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).