Date: Tue, 17 Sep 2013 19:26:02 +0000 (UTC) From: "Bjoern A. Zeeb" <bz@FreeBSD.org> To: John-Mark Gurney <jmg@FreeBSD.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r255187 - in head/sys: conf crypto/aesni modules/aesni Message-ID: <alpine.BSF.2.00.1309171923510.4210@ai.fobar.qr> In-Reply-To: <201309031831.r83IVNkh026523@svn.freebsd.org> References: <201309031831.r83IVNkh026523@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 3 Sep 2013, John-Mark Gurney wrote: > Author: jmg > Date: Tue Sep 3 18:31:23 2013 > New Revision: 255187 > URL: http://svnweb.freebsd.org/changeset/base/255187 > > Log: > Use the fact that the AES-NI instructions can be pipelined to improve > performance... Use SSE2 instructions for calculating the XTS tweek > factor... Let the compiler do more work and handle register allocation > by using intrinsics, now only the key schedule is in assembly... > > Replace .byte hard coded instructions w/ the proper instructions now > that both clang and gcc support them... > > On my machine, pulling the code to userland I saw performance go from > ~150MB/sec to 2GB/sec in XTS mode. GELI on GNOP saw a more modest > increase of about 3x due to other system overhead (geom and > opencrypto)... > > These changes allow almost full disk io rate w/ geli... > > Reviewed by: -current, -security > Thanks to: Mike Hamburg for the XTS tweek algorithm > > Added: > head/sys/crypto/aesni/aesencdec.h (contents, props changed) > Deleted: > head/sys/crypto/aesni/aesencdec_amd64.S > head/sys/crypto/aesni/aesencdec_i386.S > Modified: > head/sys/conf/files.amd64 > head/sys/conf/files.i386 > head/sys/crypto/aesni/aeskeys_amd64.S > head/sys/crypto/aesni/aesni.c > head/sys/crypto/aesni/aesni.h > head/sys/crypto/aesni/aesni_wrap.c > head/sys/modules/aesni/Makefile > ... > Added: head/sys/crypto/aesni/aesencdec.h > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/sys/crypto/aesni/aesencdec.h Tue Sep 3 18:31:23 2013 (r255187) > @@ -0,0 +1,136 @@ > +/*- > + * Copyright 2013 John-Mark Gurney <jmg@FreeBSD.org> > + * All rights reserved. > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * 2. Redistributions in binary form must reproduce the above copyright > + * notice, this list of conditions and the following disclaimer in the > + * documentation and/or other materials provided with the distribution. > + * > + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > + * SUCH DAMAGE. > + * > + * $FreeBSD$ > + * > + */ > + > +#include <wmmintrin.h> > + This pulls in a header from user space, in fact from clang, and if cross-building without building clang this header file is not available and a buildkernel is failing. (paths shortend) In file included from /sys/modules/aesni/../../crypto/aesni/aesni_wrap.c:40: /sys/modules/aesni/../../crypto/aesni/aesencdec.h:30:10: fatal error: 'wmmintrin.h' file not found #include <wmmintrin.h> ^ 1 error generated. --- aesni_wrap.o --- -- Bjoern A. Zeeb ????????? ??? ??????? ??????: '??? ??? ???? ?????? ??????? ?? ?? ??????? ??????? ??? ????? ????? ???? ?????? ?? ????? ????', ????????? ?????????, "??? ????? ?? ?????", ?.???
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.1309171923510.4210>