diff options
author | Mark Johnston <markj@FreeBSD.org> | 2021-02-08 14:19:27 +0000 |
---|---|---|
committer | Mark Johnston <markj@FreeBSD.org> | 2021-02-08 14:19:27 +0000 |
commit | db6b56441e3a142e7fe58a5a85d9071e772a943e (patch) | |
tree | ddf9da6064e039f2dcf6cbadf549a510df4cd306 /sys/dev | |
parent | 68f6800ce05c386ff045b4416d8595d09c4d8fdd (diff) | |
download | src-db6b56441e3a142e7fe58a5a85d9071e772a943e.tar.gz src-db6b56441e3a142e7fe58a5a85d9071e772a943e.zip |
ktls: Avoid wakeups and locking for synchronous callbacks
When performing encryption in software, the KTLS crypto callback always
locks the session to deliver a wakeup. But, if we're handling the
operation synchronously this is wasted effort and can result in
sleepqueue lock contention on large systems.
Use CRYPTO_SESS_SYNC() to determine whether the operation will be
completed asynchronously or not, and select a callback appropriately.
Avoid locking the session to check for completion if the session handles
requests synchronously.
Reviewed by: jhb
Sponsored by: Ampere Computing
Submitted by: Klara, Inc.
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D28195
Diffstat (limited to 'sys/dev')
0 files changed, 0 insertions, 0 deletions