Skip to content

feat(uhyve): use v2 interface#2190

Open
n0toose wants to merge 1 commit intohermit-os:mainfrom
n0toose:uhyve-v2-io-with-rcx
Open

feat(uhyve): use v2 interface#2190
n0toose wants to merge 1 commit intohermit-os:mainfrom
n0toose:uhyve-v2-io-with-rcx

Conversation

@n0toose
Copy link
Member

@n0toose n0toose commented Jan 23, 2026

On x86_64, the data address will be stored in the rcx register to support 64-bit addresses.

This also removes the usage of ExitArgs, as it is a single integer.

@n0toose
Copy link
Member Author

n0toose commented Jan 23, 2026

Succeeds #2013

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark Results

Details
Benchmark Current: 3ab4c9b Previous: af77eb8 Performance Ratio
startup_benchmark Build Time 102.04 s 96.76 s 1.05
startup_benchmark File Size 0.87 MB 0.82 MB 1.06
Startup Time - 1 core 0.95 s (±0.03 s) 0.93 s (±0.03 s) 1.02
Startup Time - 2 cores 0.97 s (±0.03 s) 0.93 s (±0.03 s) 1.04
Startup Time - 4 cores 0.97 s (±0.03 s) 0.95 s (±0.04 s) 1.02
multithreaded_benchmark Build Time 98.64 s 94.96 s 1.04
multithreaded_benchmark File Size 0.97 MB 0.96 MB 1.01
Multithreaded Pi Efficiency - 2 Threads 88.28 % (±10.31 %) 88.34 % (±8.83 %) 1.00
Multithreaded Pi Efficiency - 4 Threads 44.34 % (±3.38 %) 43.96 % (±2.87 %) 1.01
Multithreaded Pi Efficiency - 8 Threads 25.84 % (±1.72 %) 25.67 % (±1.88 %) 1.01
micro_benchmarks Build Time 106.63 s 107.03 s 1.00
micro_benchmarks File Size 0.98 MB 0.97 MB 1.01
Scheduling time - 1 thread 68.76 ticks (±3.68 ticks) 68.40 ticks (±2.80 ticks) 1.01
Scheduling time - 2 threads 36.55 ticks (±4.22 ticks) 36.75 ticks (±3.77 ticks) 0.99
Micro - Time for syscall (getpid) 3.60 ticks (±0.33 ticks) 3.72 ticks (±0.30 ticks) 0.97
Memcpy speed - (built_in) block size 4096 65751.81 MByte/s (±46819.26 MByte/s) 65936.06 MByte/s (±46962.77 MByte/s) 1.00
Memcpy speed - (built_in) block size 1048576 30007.52 MByte/s (±24673.07 MByte/s) 29711.39 MByte/s (±24468.80 MByte/s) 1.01
Memcpy speed - (built_in) block size 16777216 28464.60 MByte/s (±23679.05 MByte/s) 28572.31 MByte/s (±23801.85 MByte/s) 1.00
Memset speed - (built_in) block size 4096 66521.25 MByte/s (±47409.21 MByte/s) 66224.66 MByte/s (±47148.82 MByte/s) 1.00
Memset speed - (built_in) block size 1048576 30803.40 MByte/s (±25134.16 MByte/s) 30455.87 MByte/s (±24906.53 MByte/s) 1.01
Memset speed - (built_in) block size 16777216 29252.03 MByte/s (±24132.00 MByte/s) 29305.64 MByte/s (±24204.32 MByte/s) 1.00
Memcpy speed - (rust) block size 4096 61636.07 MByte/s (±45291.00 MByte/s) 59811.41 MByte/s (±43763.94 MByte/s) 1.03
Memcpy speed - (rust) block size 1048576 29793.27 MByte/s (±24596.20 MByte/s) 29629.02 MByte/s (±24504.10 MByte/s) 1.01
Memcpy speed - (rust) block size 16777216 28618.43 MByte/s (±23833.55 MByte/s) 28401.51 MByte/s (±23669.15 MByte/s) 1.01
Memset speed - (rust) block size 4096 62601.98 MByte/s (±45975.03 MByte/s) 60851.37 MByte/s (±44540.62 MByte/s) 1.03
Memset speed - (rust) block size 1048576 30500.51 MByte/s (±25015.95 MByte/s) 30426.48 MByte/s (±24959.19 MByte/s) 1.00
Memset speed - (rust) block size 16777216 29417.63 MByte/s (±24294.98 MByte/s) 29175.93 MByte/s (±24111.52 MByte/s) 1.01
alloc_benchmarks Build Time 103.27 s 102.72 s 1.01
alloc_benchmarks File Size 0.94 MB 0.89 MB 1.06
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 8342.46 Ticks (±150.52 Ticks) 8547.70 Ticks (±113.80 Ticks) 0.98
Allocations - Average Allocation time (no fail) 8342.46 Ticks (±150.52 Ticks) 8547.70 Ticks (±113.80 Ticks) 0.98
Allocations - Average Deallocation time 1369.15 Ticks (±698.80 Ticks) 1117.79 Ticks (±513.75 Ticks) 1.22
mutex_benchmark Build Time 104.33 s 111.82 s 0.93
mutex_benchmark File Size 0.98 MB 0.97 MB 1.01
Mutex Stress Test Average Time per Iteration - 1 Threads 12.84 ns (±0.61 ns) 13.38 ns (±0.85 ns) 0.96
Mutex Stress Test Average Time per Iteration - 2 Threads 15.52 ns (±0.75 ns) 15.68 ns (±0.79 ns) 0.99

This comment was automatically generated by workflow using github-action-benchmark.

On x86_64, the data address will be stored in the rdi register
to support 64-bit addresses.

This also removes the usage of ExitArgs, as it is a single integer.

We additionally introduce improved, more POSIX-compliant-ish error
handling together, more debugging messages and replaced the if..else
with matches for readability reasons.

Co-authored-by: Ellen Εμιλία Άννα Zscheile <fogti+devel@ytrizja.de>
Helped-by: Jonathan Klimt <jonathan.klimt@eonerc.rwth-aachen.de>

Replace register, improve error handling, assert UhyveStdout/UhyveStderr return value, use matches

fix abs bug
@n0toose n0toose force-pushed the uhyve-v2-io-with-rcx branch from 51d43e9 to b9e2d21 Compare February 8, 2026 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant