Skip to content

refactor: clean up arch-specific imports#2486

Merged
mkroening merged 20 commits into
mainfrom
arch-imports
Jun 18, 2026
Merged

refactor: clean up arch-specific imports#2486
mkroening merged 20 commits into
mainfrom
arch-imports

Conversation

@mkroening

@mkroening mkroening commented Jun 17, 2026

Copy link
Copy Markdown
Member

This PR cleans up imports from the arch module. This unifies the way arch-specific items are imported and makes things less confusing. Unfortunately, this creates a lot of churn, but I think this is overdue.

This potentially impacts projects that use the kernel's Rust API:

  • load_application and jump_to_user_land are now exported at hermit::common_os instead of hermit::arch.
  • DEFAULT_STACK_SIZE is now exported at hermit::config instead of hermit.

@mkroening mkroening self-assigned this Jun 17, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

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: c49e3f8 Previous: a1f61b1 Performance Ratio
startup_benchmark Build Time 81.34 s 78.48 s 1.04
startup_benchmark File Size 0.76 MB 0.76 MB 1.00
Startup Time - 1 core 0.74 s (±0.02 s) 0.74 s (±0.03 s) 1.01
Startup Time - 2 cores 0.75 s (±0.02 s) 0.74 s (±0.02 s) 1.01
Startup Time - 4 cores 0.75 s (±0.02 s) 0.75 s (±0.02 s) 1.00
multithreaded_benchmark Build Time 76.63 s 80.13 s 0.96
multithreaded_benchmark File Size 0.82 MB 0.82 MB 1.00
Multithreaded Pi Efficiency - 2 Threads 85.46 % (±7.17 %) 89.16 % (±6.61 %) 0.96
Multithreaded Pi Efficiency - 4 Threads 43.14 % (±2.61 %) 43.73 % (±3.07 %) 0.99
Multithreaded Pi Efficiency - 8 Threads 25.22 % (±1.65 %) 25.43 % (±1.47 %) 0.99
micro_benchmarks Build Time 88.08 s 87.54 s 1.01
micro_benchmarks File Size 0.82 MB 0.82 MB 1.00
Scheduling time - 1 thread 64.06 ticks (±2.61 ticks) 63.88 ticks (±3.26 ticks) 1.00
Scheduling time - 2 threads 35.65 ticks (±2.61 ticks) 35.42 ticks (±2.66 ticks) 1.01
Micro - Time for syscall (getpid) 2.78 ticks (±0.21 ticks) 2.75 ticks (±0.16 ticks) 1.01
Memcpy speed - (built_in) block size 4096 81298.74 MByte/s (±56185.22 MByte/s) 83476.99 MByte/s (±57740.79 MByte/s) 0.97
Memcpy speed - (built_in) block size 1048576 30971.58 MByte/s (±25218.65 MByte/s) 31152.85 MByte/s (±25279.17 MByte/s) 0.99
Memcpy speed - (built_in) block size 16777216 26950.57 MByte/s (±22279.56 MByte/s) 27725.51 MByte/s (±22925.84 MByte/s) 0.97
Memset speed - (built_in) block size 4096 81437.62 MByte/s (±56288.66 MByte/s) 83217.71 MByte/s (±57563.67 MByte/s) 0.98
Memset speed - (built_in) block size 1048576 31740.70 MByte/s (±25650.93 MByte/s) 31876.80 MByte/s (±25692.46 MByte/s) 1.00
Memset speed - (built_in) block size 16777216 27728.81 MByte/s (±22774.29 MByte/s) 28494.61 MByte/s (±23394.70 MByte/s) 0.97
Memcpy speed - (rust) block size 4096 73776.72 MByte/s (±51393.97 MByte/s) 73364.36 MByte/s (±51262.13 MByte/s) 1.01
Memcpy speed - (rust) block size 1048576 30997.96 MByte/s (±25222.13 MByte/s) 30937.29 MByte/s (±25120.05 MByte/s) 1.00
Memcpy speed - (rust) block size 16777216 26695.77 MByte/s (±22013.24 MByte/s) 27877.21 MByte/s (±23028.92 MByte/s) 0.96
Memset speed - (rust) block size 4096 74463.60 MByte/s (±51863.93 MByte/s) 73552.60 MByte/s (±51389.43 MByte/s) 1.01
Memset speed - (rust) block size 1048576 31737.92 MByte/s (±25643.68 MByte/s) 31673.17 MByte/s (±25534.80 MByte/s) 1.00
Memset speed - (rust) block size 16777216 27467.23 MByte/s (±22508.22 MByte/s) 28652.43 MByte/s (±23502.32 MByte/s) 0.96
alloc_benchmarks Build Time 86.31 s 81.48 s 1.06
alloc_benchmarks File Size 0.84 MB 0.84 MB 1.00
Allocations - Allocation success 91.32 % 91.32 % 1
Allocations - Deallocation success 100.00 % 100.00 % 1
Allocations - Pre-fail Allocations 61.46 % 61.46 % 1
Allocations - Average Allocation time 5126.61 Ticks (±889.82 Ticks) 3790.46 Ticks (±895.05 Ticks) 1.35
Allocations - Average Allocation time (no fail) 5901.12 Ticks (±865.72 Ticks) 4704.79 Ticks (±884.27 Ticks) 1.25
Allocations - Average Deallocation time 1453.28 Ticks (±440.21 Ticks) 1125.38 Ticks (±370.72 Ticks) 1.29
mutex_benchmark Build Time 85.97 s 104.96 s 0.82
mutex_benchmark File Size 0.82 MB 0.82 MB 1.00
Mutex Stress Test Average Time per Iteration - 1 Threads 12.38 ns (±0.49 ns) 12.00 ns (±0.40 ns) 1.03
Mutex Stress Test Average Time per Iteration - 2 Threads 18.32 ns (±1.21 ns) 16.88 ns (±0.68 ns) 1.09

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

@mkroening mkroening force-pushed the arch-imports branch 2 times, most recently from c0f3f2f to bfaf5fd Compare June 17, 2026 17:08
@mkroening mkroening marked this pull request as ready for review June 17, 2026 20:19
@mkroening mkroening enabled auto-merge June 18, 2026 09:22
@mkroening mkroening added this pull request to the merge queue Jun 18, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Jun 18, 2026
@mkroening mkroening added this pull request to the merge queue Jun 18, 2026
Merged via the queue into main with commit 7c60ced Jun 18, 2026
20 checks passed
@mkroening mkroening deleted the arch-imports branch June 18, 2026 16:22
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