[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] x86/time: Adjust init-time handling of pit0_ticks



>>> On 20.12.16 at 13:17, <andrew.cooper3@xxxxxxxxxx> wrote:
> On 20/12/2016 07:25, Jan Beulich wrote:
>>>>> On 19.12.16 at 17:58, <andrew.cooper3@xxxxxxxxxx> wrote:
>>> On 19/12/16 16:51, Jan Beulich wrote:
>>>>>>> On 19.12.16 at 17:38, <andrew.cooper3@xxxxxxxxxx> 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.

Sounds fine.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.