Page MenuHomeFreeBSD

Protect global ifnet list and short lived ifaddr references with epoch
ClosedPublic

Authored by mmacy on May 13 2018, 1:34 AM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 1 2024, 7:38 AM
Unknown Object (File)
Dec 22 2023, 11:03 PM
Unknown Object (File)
Dec 12 2023, 12:06 AM
Unknown Object (File)
Nov 22 2023, 12:44 AM
Unknown Object (File)
Nov 11 2023, 3:05 PM
Unknown Object (File)
Nov 7 2023, 8:15 PM
Unknown Object (File)
Nov 6 2023, 9:46 PM
Unknown Object (File)
Oct 30 2023, 10:54 AM

Details

Summary

My weekend project has been improving UDP transmit performance:
https://github.com/ScaleBSD/scalebsd.github.io/blob/master/_drafts/2018-05-12-UDP-On-FreeBSD-is-anyone-using-this-at-scale.md

  • To address the contention on ifnet_rwlock seen in the second flame graph I replaced rlock calls with epoch_{enter, exit} and made the necessary changes to ensure a grace period elapsed on deletion of ifnet and other things whose liveness is protected by said lock.
  • To address the contention on the ifaddr reference that that in turn revealed I ensured that all short term references to an ifaddr were instead protected by epoch. Refcount updates are now only needed for persistent references on the heap.
Test Plan

pho and canary at Limelight Networks

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 16683

Event Timeline

mmacy edited the test plan for this revision. (Show Details)
  • update to today's HEAD
  • merge with D15410: replace AF_DATA rlock path with epoch

I think a week is a sufficient comment period for a straightforward change. I'll be committing this on Monday if there are no issues seen by pho or LLNW.

This revision is now accepted and ready to land.May 18 2018, 11:15 PM