Skip to content

feat: add support for MASOS apps#2426

Open
mkroening wants to merge 7 commits into
mainfrom
masos
Open

feat: add support for MASOS apps#2426
mkroening wants to merge 7 commits into
mainfrom
masos

Conversation

@mkroening
Copy link
Copy Markdown
Member

@mkroening mkroening commented May 11, 2026

This PR adds the syscall infrastructure from hermit-os/hermit-rs#970 to hermit-builtins in the kernel repo instead.

Benefits:

  • It is easier to keep the syscall abstraction and the syscalls in sync.
  • We can reuse hermit-builtin's math and mem primitives.
  • It easier to use since we just link against a libhermit.a as always.

During the transition, I have refactored most of the code.

See hermit-os/hermit-rs#994.
Depends on hermit-os/hermit-rs#995.
Closes hermit-os/hermit-rs#874.

Copy link
Copy Markdown

@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: 277e6c6 Previous: a025f19 Performance Ratio
startup_benchmark Build Time 118.64 s 116.82 s 1.02
startup_benchmark File Size 0.77 MB 0.77 MB 1.00
Startup Time - 1 core 1.00 s (±0.04 s) 1.00 s (±0.03 s) 1.00
Startup Time - 2 cores 1.01 s (±0.05 s) 1.04 s (±0.05 s) 0.98
Startup Time - 4 cores 1.00 s (±0.02 s) 1.02 s (±0.05 s) 0.97
multithreaded_benchmark Build Time 120.04 s 117.48 s 1.02
multithreaded_benchmark File Size 0.84 MB 0.84 MB 1.00
Multithreaded Pi Efficiency - 2 Threads 88.67 % (±15.72 %) 85.06 % (±19.28 %) 1.04
Multithreaded Pi Efficiency - 4 Threads 44.53 % (±8.03 %) 42.20 % (±9.32 %) 1.06
Multithreaded Pi Efficiency - 8 Threads 24.89 % (±4.03 %) 23.57 % (±5.00 %) 1.06
micro_benchmarks Build Time 99.45 s 92.09 s 1.08
micro_benchmarks File Size 0.84 MB 0.84 MB 1.00
Scheduling time - 1 thread 70.54 ticks (±3.98 ticks) 73.19 ticks (±3.39 ticks) 0.96
Scheduling time - 2 threads 40.63 ticks (±6.33 ticks) 44.10 ticks (±6.54 ticks) 0.92
Micro - Time for syscall (getpid) 3.03 ticks (±0.19 ticks) 3.09 ticks (±0.16 ticks) 0.98
Memcpy speed - (built_in) block size 4096 76127.89 MByte/s (±52623.65 MByte/s) 73877.55 MByte/s (±50900.64 MByte/s) 1.03
Memcpy speed - (built_in) block size 1048576 29652.62 MByte/s (±24325.63 MByte/s) 29621.41 MByte/s (±24412.82 MByte/s) 1.00
Memcpy speed - (built_in) block size 16777216 24226.25 MByte/s (±19983.23 MByte/s) 26615.80 MByte/s (±21973.01 MByte/s) 0.91
Memset speed - (built_in) block size 4096 76008.47 MByte/s (±52537.52 MByte/s) 74082.46 MByte/s (±51039.25 MByte/s) 1.03
Memset speed - (built_in) block size 1048576 30422.22 MByte/s (±24764.70 MByte/s) 30381.08 MByte/s (±24836.90 MByte/s) 1.00
Memset speed - (built_in) block size 16777216 24882.85 MByte/s (±20384.16 MByte/s) 27365.04 MByte/s (±22427.19 MByte/s) 0.91
Memcpy speed - (rust) block size 4096 66695.72 MByte/s (±46775.62 MByte/s) 67998.13 MByte/s (±47775.53 MByte/s) 0.98
Memcpy speed - (rust) block size 1048576 29548.99 MByte/s (±24266.05 MByte/s) 29415.03 MByte/s (±24216.28 MByte/s) 1.00
Memcpy speed - (rust) block size 16777216 23560.59 MByte/s (±19422.86 MByte/s) 26645.15 MByte/s (±21980.78 MByte/s) 0.88
Memset speed - (rust) block size 4096 66947.82 MByte/s (±46936.44 MByte/s) 68410.01 MByte/s (±48051.67 MByte/s) 0.98
Memset speed - (rust) block size 1048576 30279.25 MByte/s (±24699.88 MByte/s) 30182.39 MByte/s (±24662.20 MByte/s) 1.00
Memset speed - (rust) block size 16777216 24285.66 MByte/s (±19914.26 MByte/s) 27320.66 MByte/s (±22364.88 MByte/s) 0.89
alloc_benchmarks Build Time 91.49 s 91.56 s 1.00
alloc_benchmarks File Size 0.85 MB 0.85 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 4168.20 Ticks (±56.77 Ticks) 4553.50 Ticks (±57.46 Ticks) 0.92
Allocations - Average Allocation time (no fail) 4168.20 Ticks (±56.77 Ticks) 4553.50 Ticks (±57.46 Ticks) 0.92
Allocations - Average Deallocation time 654.28 Ticks (±63.71 Ticks) 1035.15 Ticks (±129.57 Ticks) 0.63
mutex_benchmark Build Time 93.37 s 88.37 s 1.06
mutex_benchmark File Size 0.84 MB 0.84 MB 1.00
Mutex Stress Test Average Time per Iteration - 1 Threads 13.74 ns (±0.59 ns) 14.02 ns (±0.84 ns) 0.98
Mutex Stress Test Average Time per Iteration - 2 Threads 17.60 ns (±0.69 ns) 17.80 ns (±4.95 ns) 0.99

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

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.

2 participants