Page MenuHomeFreeBSD

iommu_gas: speed up augmentation
AbandonedPublic

Authored by dougm on Aug 7 2022, 5:35 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sep 2 2025, 12:16 PM
Unknown Object (File)
Jul 7 2025, 1:49 AM
Unknown Object (File)
Apr 22 2025, 12:49 PM
Unknown Object (File)
Apr 11 2025, 2:47 AM
Unknown Object (File)
Mar 13 2025, 5:56 PM
Unknown Object (File)
Oct 9 2024, 8:20 AM
Unknown Object (File)
Oct 4 2024, 11:46 PM
Unknown Object (File)
Sep 8 2024, 7:48 PM
Subscribers
None

Details

Reviewers
alc
Summary

Rewrite iommu_gas_augment_entry to be 32 bytes smaller, after compilation, and a bit faster.

Test Plan

A copy of the original and modified code is included in this test program:

, which is used to randomly insert and remove nodes while maintaining augmentation info. The change produces a measurable improvement.

x times.orig
+ times
+-------------------------------------------------------------------------------------+
|                 +    +    +     +                 x                               x |
|                +++  +++   +    +++x       x x     x  +    xxxxx                  xxx|
|++  +      ++   +++ ++++ +++    +++x ++    *xxx  x **++x  xxxxxx  x  x       xx  xxxx|
|             |__________M__A____________|     |_____________MA______________|        |
+-------------------------------------------------------------------------------------+
    N           Min           Max        Median           Avg        Stddev
x  40     87.234735     89.271164     88.287936     88.333866    0.61713185
+  40     85.813025      88.02519     86.803171     86.911903    0.56699337
Difference at 99.5% confidence
        -1.42196 +/- 0.42376
        -1.60976% +/- 0.479726%
        (Student's t, pooled s = 0.592593)

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

dougm requested review of this revision.Aug 7 2022, 5:35 AM
dougm created this revision.