HomeFreeBSD

ipsec: replace SECASVAR mtx by rmlock

Description

ipsec: replace SECASVAR mtx by rmlock

This mutex is a significant point of contention in the ipsec code, and
can be relatively trivially replaced by a read-mostly lock.
It does require a separate lock for the replay protection, which we do
here by adding a separate mutex.

This improves throughput (without replay protection) by 10-15%.

MFC after: 3 weeks
Sponsored by: Orange Business Services
Differential Revision: https://reviews.freebsd.org/D35763

Details

Provenance
kpAuthored on Jun 23 2022, 8:35 PM
Differential Revision
D35763: ipsec: replace SECASVAR mtx by rmlock
Parents
rG4eaaacc75535: x86/iommu: Shrink the critical section in dmar_qi_task()
Branches
Unknown
Tags
Unknown