[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAFUsyf+TuU2Xe5Guy5yiFWsV-JZSjUJxcGZv=f0BYDSmODV+_w@mail.gmail.com>
Date: Fri, 26 Nov 2021 13:14:32 -0600
From: Noah Goldstein <goldstein.w.n@...il.com>
To: Eric Dumazet <edumazet@...gle.com>
Cc: tglx@...utronix.de, mingo@...hat.com,
Borislav Petkov <bp@...en8.de>, dave.hansen@...ux.intel.com,
X86 ML <x86@...nel.org>, hpa@...or.com, peterz@...radead.org,
alexanderduyck@...com, open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v1] x86/lib: Optimize 8x loop and memory clobbers in csum_partial.c
On Fri, Nov 26, 2021 at 12:50 PM Noah Goldstein <goldstein.w.n@...il.com> wrote:
>
> On Fri, Nov 26, 2021 at 12:27 PM Eric Dumazet <edumazet@...gle.com> wrote:
> >
> > On Fri, Nov 26, 2021 at 10:17 AM Noah Goldstein <goldstein.w.n@...il.com> wrote:
> > >
> >
> > >
> > > Makes sense. Although if you inline I think you definitely will want a more
> > > conservative clobber than just "memory". Also I think with 40 you also will
> > > get some value from two counters.
> > >
> > > Did you see the number/question I posted about two accumulators for 32
> > > byte case?
> > > Its a judgement call about latency vs throughput that I don't really have an
> > > answer for.
> > >
> >
> > The thing I do not know is if using more units would slow down the
> > hyper thread ?
Did some quick tests with the latency/throughput benchmarks running
in parallel on two hyperthreads on the same processors. The 32 byte case
latency advantage goes with 2 accum and there is still a slight regression
in throughput. The larger cases that hit the loop still still have improvements
both in tput and latency with 2 accum.
>
> There are more uops in the two accumulator version so it could be concern
> iff the other hyperthread is bottlenecked on p06 throughput. My general
> understanding is this is not the common case and that the very premise of
> hyperthreads is that most bottlenecks are related to memory fetch or resolving
> control flow.
>
> >
> > Would using ADCX/ADOX would be better in this respect ?
>
> What would code using those instructions look like? Having trouble
> seeing how to use them here.
Powered by blists - more mailing lists