freebsd-nq/sys
Pawel Jakub Dawidek 5fa1b35081 Improve AES-NI performance for AES-XTS:
- Operate on uint64_t types when doing XORing, etc. instead of uint8_t.
- Don't bzero() temporary block for every AES block. Do it once for entire
  data block.
- AES-NI is available only on little endian architectures. Simplify code
  that takes block number from IV.

Benchmarks:

Memory-backed md(4) device, software AES-XTS, 4kB sector:

	# dd if=/dev/md0.eli bs=1m
	59.61MB/s

Memory-backed md(4) device, old AES-NI AES-XTS, 4kB sector:

	# dd if=/dev/md0.eli bs=1m
	97.29MB/s

Memory-backed md(4) device, new AES-NI AES-XTS, 4kB sector:

	# dd if=/dev/md0.eli bs=1m
	221.26MB/s

127% performance improvement between old and new code.

Harddisk, raw speed:

	# dd if=/dev/ada0 bs=1m
	137.63MB/s

Harddisk, software AES-XTS, 4kB sector:

	# dd if=/dev/ada0.eli bs=1m
	47.83MB/s (34% of raw disk speed)

Harddisk, old AES-NI AES-XTS, 4kB sector:

	# dd if=/dev/ada0.eli bs=1m
	68.33MB/s (49% of raw disk speed)

Harddisk, new AES-NI AES-XTS, 4kB sector:

	# dd if=/dev/ada0.eli bs=1m
	108.35MB/s (78% of raw disk speed)

58% performance improvement between old and new code.

As a side-note, GELI with AES-NI using AES-CBC can achive native disk speed.

MFC after:	3 days
2011-10-27 14:07:57 +00:00
..
amd64 Adjust the debugger options slightly. This should help me do the right 2011-10-27 13:07:49 +00:00
arm Check the return value of BUS_SETUP_INTR() 2011-10-27 10:21:40 +00:00
boot Remove the long reprecated ``/stand/sysinstall'' from the init_path. 2011-10-27 10:25:11 +00:00
bsm Add ECAPMODE, "Not permitted in capability mode", a new kernel errno 2011-03-01 13:14:28 +00:00
cam Add descriptor sense support to CAM, and honor sense residuals properly in 2011-10-03 20:32:55 +00:00
cddl Fix typo in copyright notice introduced in r226724 2011-10-25 13:52:38 +00:00
compat Control the execution permission of the readable segments for 2011-10-15 12:35:18 +00:00
conf Add libkern/ucmpdi2.c 2011-10-26 19:07:36 +00:00
contrib Utilize new IF_DEQUEUE_ALL(ifq, m) macro in pfsyncintr() to reduce 2011-10-27 09:47:00 +00:00
crypto Improve AES-NI performance for AES-XTS: 2011-10-27 14:07:57 +00:00
ddb Follow up to r225203 refining break-to-debugger run-time configuration 2011-08-27 14:24:27 +00:00
dev SRAM offset 0x0C04 is used by driver to inform the IPMI/ASF firmware 2011-10-26 23:52:02 +00:00
fs The use of VOP_ISLOCKED() without a check for the return values can cause 2011-10-24 13:56:31 +00:00
gdb Modify kdb_trap() so that it re-calls the dbbe_trap function as long as 2011-02-18 22:25:11 +00:00
geom Clarify disks/volumes above 2TiB support in geom_raid: 2011-10-26 21:50:10 +00:00
gnu Second-to-last commit implementing Capsicum capabilities in the FreeBSD 2011-08-11 12:30:23 +00:00
i386 Adjust the debugger options slightly. This should help me do the right 2011-10-27 13:07:49 +00:00
ia64 Adjust the debugger options slightly. This should help me do the right 2011-10-27 13:07:49 +00:00
isa Move VT switching hack for suspend/resume from bus drivers to syscons.c 2011-05-09 18:46:49 +00:00
kern Remove the long reprecated ``/stand/sysinstall'' from the init_path. 2011-10-27 10:25:11 +00:00
kgssapi Add missing break statement to make sure all 3DES etypes really are treated 2011-10-10 09:13:07 +00:00
libkern Add strnlen() to libkern. 2011-10-04 23:53:47 +00:00
mips People porting FreeBSD to new architectures ought not have to 2011-10-21 06:41:46 +00:00
modules Don't look for includes in userland directories. There is no need for it 2011-10-25 16:22:43 +00:00
net Add macro IF_DEQUEUE_ALL(ifq, m), that takes the entire mbuf chain off 2011-10-27 09:45:12 +00:00
net80211 Fix an unused variable warning/error when invariants isn't enabled. 2011-10-12 10:19:55 +00:00
netatalk
netgraph - If KDB & NETGRAPH_DEBUG are on, print traces on discovered failed 2011-10-27 09:43:25 +00:00
netinet Exclude host routes when checking for prefix coverage on multiple 2011-10-25 04:06:29 +00:00
netinet6 The code change made in r226040 was incomplete and resulted in 2011-10-16 22:24:04 +00:00
netipsec Add missing va_end() in an error case to clean up after va_start() 2011-10-07 21:00:26 +00:00
netipx
netnatm
netncp Change ncp_scan_bindery_object() to pass a constant search string. 2011-10-16 08:44:03 +00:00
netsmb Change some variables from int to size_t. This is more accurate since 2011-01-08 23:06:54 +00:00
nfs In order to maximize the re-usability of kernel code in user space this 2011-09-16 13:58:51 +00:00
nfsclient Merge 220876, 220877, and 221537 from the new NFS client to the old: 2011-08-09 15:29:58 +00:00
nfsserver Fix the NFS servers so that they can do a Lookup of "..", 2011-09-03 00:28:53 +00:00
nlm In order to maximize the re-usability of kernel code in user space this 2011-09-16 13:58:51 +00:00
ofed - change "is is" to "is" or "it is" 2011-10-16 14:30:28 +00:00
opencrypto Add the fo_chown and fo_chmod methods to struct fileops and use them 2011-08-16 20:07:47 +00:00
pc98 Adjust the debugger options slightly. This should help me do the right 2011-10-27 13:07:49 +00:00
pci Close a race where SIOCGIFMEDIA ioctl get inconsistent link status. 2011-10-17 19:49:00 +00:00
powerpc Adjust the debugger options slightly. This should help me do the right 2011-10-27 13:07:49 +00:00
rpc Remove an extraneous "already" from a comment introduced by r226081. 2011-10-07 13:16:21 +00:00
security Get rid of D_PSEUDO. 2011-10-18 08:09:44 +00:00
sparc64 Adjust the debugger options slightly. This should help me do the right 2011-10-27 13:07:49 +00:00
sys Add missing DEBUG define from r226514. 2011-10-19 07:16:57 +00:00
teken Link the demo application against ncursesw to make Unicode work. 2011-10-13 14:20:27 +00:00
tools GNU awk does not output escaped newlines in multi-line printc statements. This 2011-03-31 21:33:33 +00:00
ufs This update eliminates a lock-order reversal warning discovered 2011-09-27 17:41:48 +00:00
vm contigmalloc(9) and contigfree(9) are now implemented in terms of other 2011-10-27 02:52:24 +00:00
x86 Ignore SRAT memory entries if the memory range does not overlap with an 2011-10-05 16:03:47 +00:00
xdr
xen Properly handle suspend/resume events in the Xen device 2011-09-20 23:44:34 +00:00
Makefile Include sys/xen in cscope tag file generation. 2011-06-10 20:51:41 +00:00