From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Xen-devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH] x86/time: Adjust init-time handling of pit0_ticks
Date: Tue, 20 Dec 2016 12:17:08 +0000 [thread overview]
Message-ID: <86cdbf33-e2e5-3814-2cf0-fbcc2afb43fd@citrix.com> (raw)
In-Reply-To: <5858EAFA020000780012AC60@prv-mh.provo.novell.com>
On 20/12/2016 07:25, Jan Beulich wrote:
>>>> On 19.12.16 at 17:58, <andrew.cooper3@citrix.com> wrote:
>> On 19/12/16 16:51, Jan Beulich wrote:
>>>>>> On 19.12.16 at 17:38, <andrew.cooper3@citrix.com> wrote:
>>>> There is no need for the volatile cast in the timer interrupt. pit0_ticks has
>>>> external linkage, preventing the compiler from eliding the update. This
>>>> reduces the generated assembly from a read, local modify, write to a single
>>>> add instruction.
>>> I don't think external linkage is the reason here, considering the
>>> effects of whole-program-optimization.
>> In the case of whole-program-optimisation, the compiler would observe
>> that one function wrote to the variable, and one function read from it.
>> I presume that is also sufficient to prevent the eliding?
> I would think so, yes (albeit the end result of that process may
> be that everything which isn't recursive and doesn't serve as
> independent entry point ends up as a few huge functions); I
> merely wanted to point out that linkage isn't really relevant here.
What about this?
There is no need for the volatile cast in the timer interrupt; the compiler
may not elide the update. This reduces the generated assembly from a read,
local modify, write to a single add instruction.
~Andrew
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-12-20 12:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-19 16:38 [PATCH] x86/time: Adjust init-time handling of pit0_ticks Andrew Cooper
2016-12-19 16:51 ` Jan Beulich
2016-12-19 16:58 ` Andrew Cooper
2016-12-20 7:25 ` Jan Beulich
2016-12-20 12:17 ` Andrew Cooper [this message]
2016-12-20 12:56 ` Jan Beulich
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=86cdbf33-e2e5-3814-2cf0-fbcc2afb43fd@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=JBeulich@suse.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.