RwLock::read
for UFT hits, kstats use AtomicU64
#636
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR replaces the per-
Port
KMutex
with aKRwLock
. This allowsioctls to read port state without preventing packets from being served.
This also prevents successful UFT hits from blocking one another on the
port for any length of time.
A requirement is that we move to atomic accesses on kstat values, which
allows us to update kstats from outside a write-lock on the port.
The odd thing is that there doesn't seem to be a performance
improvement (in Mbps). Contention according to lockstat is solved, and
apparently the time spent in
xde_rx
/xde_mc_tx
is reduced -- we're nolonger:
Nor are we egregiously blocking on the port lock.