From owner-svn-src-all@FreeBSD.ORG Tue Sep 17 19:26:16 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 76D2A1AD; Tue, 17 Sep 2013 19:26:16 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mx1.sbone.de (bird.sbone.de [46.4.1.90]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C27C22CDA; Tue, 17 Sep 2013 19:26:15 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id BBDF825D3815; Tue, 17 Sep 2013 19:26:07 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id A6013BF8D05; Tue, 17 Sep 2013 19:26:06 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id gjL_Bo47hBsY; Tue, 17 Sep 2013 19:26:04 +0000 (UTC) Received: from nv.sbone.de (nv.sbone.de [IPv6:fde9:577b:c1a9:31::2013:138]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 57FDBBF8D02; Tue, 17 Sep 2013 19:26:03 +0000 (UTC) Date: Tue, 17 Sep 2013 19:26:02 +0000 (UTC) From: "Bjoern A. Zeeb" To: John-Mark Gurney Subject: Re: svn commit: r255187 - in head/sys: conf crypto/aesni modules/aesni In-Reply-To: <201309031831.r83IVNkh026523@svn.freebsd.org> Message-ID: References: <201309031831.r83IVNkh026523@svn.freebsd.org> X-OpenPGP-Key-Id: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Sep 2013 19:26:16 -0000 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 > + * 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 > + 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 ^ 1 error generated. --- aesni_wrap.o --- -- Bjoern A. Zeeb ????????? ??? ??????? ??????: '??? ??? ???? ?????? ??????? ?? ?? ??????? ??????? ??? ????? ????? ???? ?????? ?? ????? ????', ????????? ?????????, "??? ????? ?? ?????", ?.???