[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 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. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |