[PATCH v1] x86/string: Fixup alignment of main loop in str{n}cmp-evex [BZ #32212]

Sunil Pandey skpgkp2@gmail.com
Thu Dec 12 01:34:53 GMT 2024


On Sat, Sep 28, 2024 at 12:55 PM Noah Goldstein <goldstein.w.n@gmail.com>
wrote:

> On Sat, Sep 28, 2024 at 1:06 AM Alexander Monakov <amonakov@ispras.ru>
> wrote:
> >
> >
> > On Fri, 27 Sep 2024, Noah Goldstein wrote:
> >
> > > The loop should be aligned to 32-bytes so that it can ideally run out
> > > the DSB. This is particularly important on Skylake-Server where
> > > deficiencies in it's DSB implementation make it prone to not being
> > > able to run loops out of the DSB.
> >
> > The snippet in comment #13 of the bug suggests it's the well-known
> > Skylake JCC erratum, although without certainty because the function
> > is 16-byte aligned before your patch (we only see a branch crossing
> > a 16-byte boundary).
>
> I did not map out the DSB lines, but it could also just be capacity.
>
> >
> > The disconnect between your paragraph above and the patch where you
> > align the function to 64 bytes, not 32, is a bit confusing though.
> > If you're over-aligning the function to reduce alignment padding
> > in front of loops, can you mention that?
>
> Sure I was update the commit message. The reason for 64-byte is
> mostly because "that's what we do in many of the other functions".
> Not so principalled.
>
> >
> > Alexander
>

 I would like to backport this patch to release branches.

Any comments or objections?

--Sunil


More information about the Libc-stable mailing list