Page MenuHomeFreeBSD

bridge: Change lists to CK_LIST as a peparation for epochification
ClosedPublic

Authored by kp on Apr 1 2020, 2:26 PM.

Details

Summary

Prepare the ground for a rework of the bridge locking approach. We will
use an epoch-based approach in the datapath and making it safe to
iterate over the interface, span and rtnode lists without holding the
BRIDGE_LOCK. Replace the relevant lists by their ConcurrencyKit
equivalents.

No functional change in this commit.

Sponsored by: The FreeBSD Foundation

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

sys/net/if_bridge.c
1088 ↗(On Diff #70090)

> 80 cols?

sys/net/if_bridge.c
280 ↗(On Diff #70090)

Does this belong in this review? It doesn't appear to be referenced by other changes in this diff.

Fix style issue and remove stray epoch_ctx.

kp marked 2 inline comments as done.Apr 2 2020, 8:25 AM
kp added inline comments.
sys/net/if_bridge.c
280 ↗(On Diff #70090)

It does not. I've removed it.

This revision is now accepted and ready to land.Apr 2 2020, 8:40 AM
This revision was automatically updated to reflect the committed changes.
kp marked an inline comment as done.

Here are my result:

x r359647 in bridge mode: inet 4 packets forwarded per second
+ r359647 with D24250 in bridge mode: inet 4 packets forwarded per second
+--------------------------------------------------------------------------+
|xx                                                                      + |
|xx                                                                 +  + ++|
|A|                                                                        |
|                                                                     |_AM||
+--------------------------------------------------------------------------+
    N           Min           Max        Median           Avg        Stddev
x   5       3314595       3582601       3450403       3448858     99435.922
+   5      22726995      24346441      23963008      23715416     617156.45
Difference at 95.0% confidence
        2.02666e+07 +/- 644666
        587.631% +/- 27.5422%
        (Student's t, pooled s = 442024)