Page MenuHomeFreeBSD

Have ifmp_ring_enqueue() abdicate instead of switch to a consumer
ClosedPublic

Authored by shurd on Sep 21 2017, 6:59 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Apr 28, 3:41 PM
Unknown Object (File)
Sun, Apr 28, 3:40 PM
Unknown Object (File)
Sat, Apr 27, 1:41 PM
Unknown Object (File)
Feb 15 2024, 12:20 AM
Unknown Object (File)
Jan 28 2024, 1:12 PM
Unknown Object (File)
Dec 20 2023, 5:34 AM
Unknown Object (File)
Dec 12 2023, 8:46 PM
Unknown Object (File)
Dec 7 2023, 6:03 PM
Subscribers

Details

Summary

Move TX out of the enqueue() path. As a result, we need
to have ifmp_ring_check_drainage() pick up from the abdicate state.

We also need to either enqueue the TX task, or check drainage
after calling ifmp_ring_enqueue() to ensure it's sent.

This change results in a 30% small packet forwarding improvement.

Test Plan

Check for performance regressions when not forwarding
traffic. If regressions are present, we may need an "abdicate"
flag to selectively enable this behaviour.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 11658
Build 12004: arc lint + arc unit

Event Timeline

Yeah!!! You've fixed the problem.

x FreeBSD 11.1-RELEASE: inet4 packets-per-second
+ FreeBSD 12-HEAD r323724: inet4 pps
* FreeBSD 12-HEAD r323724 with D12439: inet4 pps
+--------------------------------------------------------------------------+
|++                                                         *   *        x |
|++                                                         ********   x xx|
|                                                                       |A||
|A|                                                                        |
|                                                            |_A__|        |
+--------------------------------------------------------------------------+
    N           Min           Max        Median           Avg        Stddev
x   5        730075        738806        734556      734964.2      3292.366
+  10        495853        499834        496560      497141.3     1415.9471
Difference at 95.0% confidence
        -237823 +/- 2571.21
        -32.3584% +/- 0.274786%
        (Student's t, pooled s = 2173.31)
*  10        691125        714426      703487.5      703086.4     8356.6996
Difference at 95.0% confidence
        -31877.8 +/- 8505.21
        -4.33733% +/- 1.15405%
        (Student's t, pooled s = 7189.03)

And there is even a big improvement regarding inet6:

x FreeBSD 11.1-RELEASE: inet6 packets-per-second
+ FreeBSD 12-HEAD r323724: inet6 pps
* FreeBSD 12-HEAD r323724 with D12439: inet6 pps
+--------------------------------------------------------------------------+
|+                                                                       * |
|+                                                                       * |
|+                                                                       * |
|+                                                        x              * |
|+                                                        x              **|
|++                                                     x xx           ****|
|                                                        |A|               |
|A                                                                         |
|                                                                       |A||
+--------------------------------------------------------------------------+
    N           Min           Max        Median           Avg        Stddev
x   5        702120        712761        709023      708479.5     3919.0839
+  10        490039      492940.5      490692.5        490898     813.06116
Difference at 95.0% confidence
        -217582 +/- 2693.58
        -30.7111% +/- 0.275736%
        (Student's t, pooled s = 2276.75)
*  10      757768.5        769699      767084.5      766178.4     3437.8562
Difference at 95.0% confidence
        57698.9 +/- 4250.57
        8.14405% +/- 0.618294%
        (Student's t, pooled s = 3592.8)

Macro stampofapproval:

This revision is now accepted and ready to land.Sep 22 2017, 6:05 AM
This revision was automatically updated to reflect the committed changes.