[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: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. > --- a/xen/arch/x86/io_apic.c > +++ b/xen/arch/x86/io_apic.c > @@ -1485,8 +1485,7 @@ static int __init timer_irq_works(void) > { > unsigned long t1, flags; > > - t1 = pit0_ticks; > - mb(); > + t1 = ACCESS_ONCE(pit0_ticks); Any reason not to use the available read_atomic() here? Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |