Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sun, 24 May 2015 06:45:02 +0300
From: Solar Designer <solar@...nwall.com>
To: john-dev@...ts.openwall.com
Subject: Re: AVX2

On Fri, May 22, 2015 at 06:26:45PM +0200, magnum wrote:
> I noticed the contest AVX2 core patch and tried applying it to Jumbo. It 
> works like a champ, including with Deepika's formats. Can I commit this 
> to bleeding for now?

You may, but I'm afraid it breaks a few things:

It replaces 256-bit AVX with AVX2, rather than adds AVX2 as an extra for
capable CPUs.  This might result in AVX2 use attempted in AVX builds.
Even if not, it'd make 256-bit AVX no longer available for 32-bit
builds with AVX (and without AVX2), which might result in slightly worse
performance on Sandy/Ivy Bridge and Bulldozer/Piledriver when running
32-bit OS.  I previously used 256-bit AVX on those as a way to partially
compensate for 32-bit mode's lower register count.  I might choose to
drop this anyway, though.

IIRC, it also reduces DES_bs_cpt from 32 to 16 unconditionally.  This
should be wrapped in #ifdef __AVX2__ (or maybe this value should come
from the arch-specific .h files instead).  Trivial to fix, indeed.

I've been meaning to add AVX2 detection to CPU_detect in x86-64.S and
x86.S.  Right now, I guess it will crash when run on a CPU not
supporting AVX2.

> >BTW I'm not sure why I never noticed this, but what does the -16 in
> >AVX-16 or AVX2-16 mean?
> 
> This still beats me, I'm curious!

I initially added SSE2-16 to refer to AMD64's revision of SSE2 with 16
registers.  I felt it wasn't the same SSE2, differing to an extent even
greater than e.g. SSE2 and SSE3 do.  So I felt it needed to be specified
differently.  Perhaps we're past that point now, with everyone else
saying just SSE2, etc., and perhaps some other indication of 32-bit vs.
64-bit build (or just the architecture identifier from configure, to
provide even more info on non-x86 builds?) would be worthwhile instead.

Alexander

Powered by blists - more mailing lists

Your e-mail address:

Powered by Openwall GNU/*/Linux - Powered by OpenVZ