]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Reduce contention on per-adapter lock.
authorjhb <jhb@FreeBSD.org>
Fri, 26 Jun 2020 00:01:31 +0000 (00:01 +0000)
committerjhb <jhb@FreeBSD.org>
Fri, 26 Jun 2020 00:01:31 +0000 (00:01 +0000)
commit4e5e6c4a79f7377c50633f5f1f4c8504df902870
tree1886bc94734136b18927fdb034281652890853cb
parent9b3292e515f4b43ee6a0054b1f1e97eb91d4bf5e
Reduce contention on per-adapter lock.

- Move temporary sglists into the session structure and protect them
  with a per-session lock instead of a per-adapter lock.

- Retire an unused session field, and move a debugging field under
  INVARIANTS to avoid using the session lock for completion handling
  when INVARIANTS isn't enabled.

- Use counter_u64 for per-adapter statistics.

Note that this helps for cases where multiple sessions are used
(e.g. multiple IPsec SAs or multiple KTLS connections).  It does not
help for workloads that use a single session (e.g. a single GELI
volume).

Reviewed by: np
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D25457
sys/dev/cxgbe/crypto/t4_crypto.c