[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] xen/x86: Fix cflush()'s parameter tracking
>>> On 15.03.19 at 15:20, <andrew.cooper3@xxxxxxxxxx> wrote: > Foring a register operand hides (from the compiler) the fact that clflush > behaves as a read from the memory operand (wrt memory order, faults, etc.). > It also reduces the compilers flexibility with register schedulling. > > Reimplement clfush() (and wbinvd() for consistency) as a static inline rather > than a macro, and have it take a const void pointer. > > In practice, the only generated code which gets modified by this is in > mwait_idle_with_hints(), where a memory operand can now be used. > > While here, I noticed that &mwait_wakeup(cpu) was being calculated twice. > This is caused by the memory clobber in mb(), so take the opportunity to help > the optimiser by calculating it once, ahead of time. bloat-o-meter reports a > delta of -26 as a result of this change. > > Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx> _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |