HomeFreeBSD

Enable SIMD for encryption

Description

Enable SIMD for encryption

When adding the SIMD compatibility code in e5db313 the decryption of a
dataset wrapping key was left in a user thread context. This was done
intentionally since it's a relatively infrequent operation. However,
this also meant that the encryption context templates were initialized
using the generic operations. Therefore, subsequent encryption and
decryption operations would use the generic implementation even when
executed by an I/O pipeline thread.

Resolve the issue by initializing the context templates in an I/O
pipeline thread. And by updating zio_do_crypt_uio() to dispatch any
encryption operations to a pipeline thread when called from the user
context. For example, when performing a read from the ARC.

Tested-by: Attila Fülöp <attila@fueloep.org>
Reviewed-by: Tom Caputi <tcaputi@datto.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #9215
Closes #9296

Details

Provenance
Brian Behlendorf <behlendorf1@llnl.gov>Authored on Sep 10 2019, 5:45 PM
GitHub <noreply@github.com>Committed on Sep 10 2019, 5:45 PM
Parents
rGb63e2d881f85: ZTS: Introduce targeted corruption in file blocks
Branches
Unknown
Tags
Unknown

Event Timeline

GitHub <noreply@github.com> committed rGb88ca2acf512: Enable SIMD for encryption (authored by Brian Behlendorf <behlendorf1@llnl.gov>).Sep 10 2019, 5:45 PM