refactor(virtio): make devices generic over transport#2447
Draft
cagatay-y wants to merge 1 commit into
Draft
Conversation
Contributor
Author
|
I've marked the PR as draft because before we can allow MMIO and PCI drivers to coexist, we need to decide how we want to handle cases where there are multiple devices of a kind (e.g. NICs, console devices, filesystems, etc.). It shouldn't hurt to merge the changes before we make those decisions but it is also not particularly useful. |
df4ad6f to
f7af9df
Compare
There was a problem hiding this comment.
Benchmark Results
Details
| Benchmark | Current: 34fe584 | Previous: 0e06134 | Performance Ratio |
|---|---|---|---|
| startup_benchmark Build Time | 114.61 s |
114.75 s |
1.00 ❗ |
| startup_benchmark File Size | 0.75 MB |
0.75 MB |
1.00 ❗ |
| Startup Time - 1 core | 1.00 s (±0.04 s) |
1.03 s (±0.05 s) |
0.97 |
| Startup Time - 2 cores | 1.03 s (±0.05 s) |
1.00 s (±0.04 s) |
1.04 |
| Startup Time - 4 cores | 1.01 s (±0.05 s) |
1.05 s (±0.06 s) |
0.96 |
| multithreaded_benchmark Build Time | 115.66 s |
118.19 s |
0.98 ❗ |
| multithreaded_benchmark File Size | 0.87 MB |
0.87 MB |
1.00 ❗ |
| Multithreaded Pi Efficiency - 2 Threads | 89.19 % (±15.26 %) |
88.13 % (±17.77 %) |
1.01 |
| Multithreaded Pi Efficiency - 4 Threads | 44.72 % (±7.49 %) |
43.83 % (±8.68 %) |
1.02 |
| Multithreaded Pi Efficiency - 8 Threads | 24.41 % (±4.02 %) |
24.19 % (±4.32 %) |
1.01 |
| micro_benchmarks Build Time | 94.37 s |
95.80 s |
0.99 ❗ |
| micro_benchmarks File Size | 0.87 MB |
0.87 MB |
1.00 ❗ |
| Scheduling time - 1 thread | 72.27 ticks (±4.06 ticks) |
73.66 ticks (±3.11 ticks) |
0.98 |
| Scheduling time - 2 threads | 42.05 ticks (±3.91 ticks) |
42.62 ticks (±4.47 ticks) |
0.99 |
| Micro - Time for syscall (getpid) | 4.10 ticks (±1.18 ticks) |
3.97 ticks (±0.24 ticks) |
1.03 |
| Memcpy speed - (built_in) block size 4096 | 74273.13 MByte/s (±51552.77 MByte/s) |
74285.81 MByte/s (±51386.38 MByte/s) |
1.00 |
| Memcpy speed - (built_in) block size 1048576 | 29586.16 MByte/s (±24261.76 MByte/s) |
29225.43 MByte/s (±24061.57 MByte/s) |
1.01 |
| Memcpy speed - (built_in) block size 16777216 | 24216.45 MByte/s (±19860.05 MByte/s) |
24481.29 MByte/s (±20083.82 MByte/s) |
0.99 |
| Memset speed - (built_in) block size 4096 | 74620.48 MByte/s (±51749.58 MByte/s) |
74360.40 MByte/s (±51439.53 MByte/s) |
1.00 |
| Memset speed - (built_in) block size 1048576 | 30324.82 MByte/s (±24684.05 MByte/s) |
29962.87 MByte/s (±24486.09 MByte/s) |
1.01 |
| Memset speed - (built_in) block size 16777216 | 24854.42 MByte/s (±20242.50 MByte/s) |
25226.63 MByte/s (±20580.18 MByte/s) |
0.99 |
| Memcpy speed - (rust) block size 4096 | 67909.73 MByte/s (±47393.90 MByte/s) |
65746.63 MByte/s (±45737.46 MByte/s) |
1.03 |
| Memcpy speed - (rust) block size 1048576 | 29606.28 MByte/s (±24297.81 MByte/s) |
29209.13 MByte/s (±23985.94 MByte/s) |
1.01 |
| Memcpy speed - (rust) block size 16777216 | 24198.28 MByte/s (±19883.36 MByte/s) |
23697.58 MByte/s (±19489.14 MByte/s) |
1.02 |
| Memset speed - (rust) block size 4096 | 68300.56 MByte/s (±47655.94 MByte/s) |
66213.47 MByte/s (±46120.45 MByte/s) |
1.03 |
| Memset speed - (rust) block size 1048576 | 30351.34 MByte/s (±24716.88 MByte/s) |
29959.89 MByte/s (±24426.81 MByte/s) |
1.01 |
| Memset speed - (rust) block size 16777216 | 24848.64 MByte/s (±20280.53 MByte/s) |
24144.16 MByte/s (±19717.09 MByte/s) |
1.03 |
| alloc_benchmarks Build Time | 90.42 s |
90.67 s |
1.00 ❗ |
| alloc_benchmarks File Size | 0.83 MB |
0.83 MB |
1.00 ❗ |
| Allocations - Allocation success | 100.00 % |
100.00 % |
1 |
| Allocations - Deallocation success | 100.00 % |
100.00 % |
1 |
| Allocations - Pre-fail Allocations | 100.00 % |
100.00 % |
1 |
| Allocations - Average Allocation time | 4058.64 Ticks (±55.95 Ticks) |
4059.19 Ticks (±54.22 Ticks) |
1.00 |
| Allocations - Average Allocation time (no fail) | 4058.64 Ticks (±55.95 Ticks) |
4059.19 Ticks (±54.22 Ticks) |
1.00 |
| Allocations - Average Deallocation time | 662.81 Ticks (±38.34 Ticks) |
686.32 Ticks (±49.99 Ticks) |
0.97 |
| mutex_benchmark Build Time | 90.50 s |
90.77 s |
1.00 ❗ |
| mutex_benchmark File Size | 0.87 MB |
0.87 MB |
1.00 ❗ |
| Mutex Stress Test Average Time per Iteration - 1 Threads | 14.02 ns (±0.71 ns) |
13.46 ns (±0.64 ns) |
1.04 |
| Mutex Stress Test Average Time per Iteration - 2 Threads | 17.34 ns (±1.78 ns) |
15.42 ns (±9.10 ns) |
1.12 |
This comment was automatically generated by workflow using github-action-benchmark.
f7af9df to
34fe584
Compare
Instead of relying on importing one of the PCI and MMIO transport modules that implement identically named structs to select the transport used by VIRTIO device drivers, use generics. This is in preparation for removing the mutual exclusivity of PCI and MMIO-based devices.
34fe584 to
22f3748
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Instead of relying on importing one of the PCI and MMIO transport modules that implement identically named structs to select the transport used by VIRTIO device drivers, use generics. This is in preparation for removing the mutual exclusivity of PCI and MMIO-based devices.