This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 0/5] i386: Optimize for Jump Conditional Code Erratum


On Thu, Nov 14, 2019 at 3:59 AM Florian Weimer <fweimer@redhat.com> wrote:
>
> * H. J. Lu:
>
> > Microcode update for Jump Conditional Code Erratum may cause performance
> > loss for some workloads:
> >
> > https://www.intel.com/content/www/us/en/support/articles/000055650.html
> >
> > Here is the set of assembler patches to mitigate performance impact by
> > aligning branches within 32-byte boundary.  The impacted instructions
> > are:
> >
> >   a. Conditional jump.
> >   b. Fused conditional jump.
> >   c. Unconditional jump.
> >   d. Call.
> >   e. Ret.
> >   f. Indirect jump and call.
> >
> > The new -mbranches-within-32B-boundaries command-line option aligns
> > conditional jump, fused conditional jump and unconditional jump within
> > 32-byte boundary.
>
> Should this mitigation be enabled by default?

We'd like to see it enabled as much as it can.   The potential issues are

1.  Some assembly codes, like Linux kernel, check the code size.   Add prefix
increases code size and may break such assembly codes.
2. Linker may re-write instructions, like TLS optimization.  Add prefixes may
cause linker error or incorrect linker output.

> According to the whitepaper, this mitigation has some overhead on
> non-affected CPUs (some Intel Atom-type CPUs are mentioned).  Is there a
> way to avoid this overhead, so that the decision to enable this by

Yes, we are looking into it.

> default is easier?
>
> Thanks,
> Florian
>


-- 
H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]