Skip to content

riscv64: Use Sstc extension to manage timer - #2704

Open
sbutz wants to merge 1 commit into
hermit-os:mainfrom
sbutz:sstc
Open

riscv64: Use Sstc extension to manage timer#2704
sbutz wants to merge 1 commit into
hermit-os:mainfrom
sbutz:sstc

Conversation

@sbutz

@sbutz sbutz commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Implements #2702.

RISC-V Profile RVA23 mandates the Sstc extension.
IMHO using Sstc should be default. Qemu 'rv64' supports it too. Sifive U740 Freedom not.

Blocked by integration of hermit-os/hermit-rs#1086
Blocked by integration of rust-embedded/riscv#419

@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: 2b7a7cc Previous: 2e23902 Performance Ratio
startup_benchmark Build Time 93.04 s 80.34 s 1.16
startup_benchmark File Size 0.79 MB 0.80 MB 0.99
Startup Time - 1 core 0.72 s (±0.02 s) 0.75 s (±0.02 s) 0.96
Startup Time - 2 cores 0.72 s (±0.02 s) 0.74 s (±0.02 s) 0.98
Startup Time - 4 cores 0.71 s (±0.02 s) 0.74 s (±0.02 s) 0.96
multithreaded_benchmark Build Time 94.72 s 82.11 s 1.15
multithreaded_benchmark File Size 0.88 MB 0.86 MB 1.02
Multithreaded Pi Efficiency - 2 Threads 67.11 % (±6.63 %) 85.89 % (±6.61 %) 0.78
Multithreaded Pi Efficiency - 4 Threads 41.32 % (±2.95 %) 43.43 % (±2.56 %) 0.95
Multithreaded Pi Efficiency - 8 Threads 19.54 % (±1.63 %) 25.76 % (±1.53 %) 0.76
micro_benchmarks Build Time 220.26 s 80.40 s 2.74
micro_benchmarks File Size 0.88 MB 0.86 MB 1.02
Scheduling time - 1 thread 165.03 ticks (±35.79 ticks) 62.65 ticks (±4.06 ticks) 2.63
Scheduling time - 2 threads 101.63 ticks (±22.17 ticks) 34.08 ticks (±4.10 ticks) 2.98
Micro - Time for syscall (getpid) 9.18 ticks (±5.34 ticks) 3.45 ticks (±0.58 ticks) 2.66
Memcpy speed - (built_in) block size 4096 58925.21 MByte/s (±41482.94 MByte/s) 82448.38 MByte/s (±56997.13 MByte/s) 0.71
Memcpy speed - (built_in) block size 1048576 14141.73 MByte/s (±11680.06 MByte/s) 30585.98 MByte/s (±24707.84 MByte/s) 0.46
Memcpy speed - (built_in) block size 16777216 11976.29 MByte/s (±9925.52 MByte/s) 26340.06 MByte/s (±21720.96 MByte/s) 0.45
Memset speed - (built_in) block size 4096 59261.74 MByte/s (±41740.86 MByte/s) 82292.76 MByte/s (±56891.50 MByte/s) 0.72
Memset speed - (built_in) block size 1048576 14477.33 MByte/s (±11847.64 MByte/s) 31323.85 MByte/s (±25145.86 MByte/s) 0.46
Memset speed - (built_in) block size 16777216 12240.07 MByte/s (±10067.66 MByte/s) 27104.68 MByte/s (±22209.94 MByte/s) 0.45
Memcpy speed - (rust) block size 4096 54370.77 MByte/s (±38760.31 MByte/s) 74097.96 MByte/s (±51811.44 MByte/s) 0.73
Memcpy speed - (rust) block size 1048576 14616.31 MByte/s (±12212.58 MByte/s) 30361.60 MByte/s (±24602.37 MByte/s) 0.48
Memcpy speed - (rust) block size 16777216 12564.86 MByte/s (±10853.01 MByte/s) 27625.34 MByte/s (±22806.88 MByte/s) 0.45
Memset speed - (rust) block size 4096 54885.73 MByte/s (±39161.32 MByte/s) 74373.47 MByte/s (±51976.48 MByte/s) 0.74
Memset speed - (rust) block size 1048576 15082.71 MByte/s (±12512.38 MByte/s) 31110.89 MByte/s (±25033.24 MByte/s) 0.48
Memset speed - (rust) block size 16777216 12970.43 MByte/s (±11132.05 MByte/s) 28386.93 MByte/s (±23265.03 MByte/s) 0.46
alloc_benchmarks Build Time 218.62 s 74.76 s 2.92
alloc_benchmarks File Size 0.87 MB 0.87 MB 0.99
Allocations - Allocation success 91.38 % 91.31 % 1.00
Allocations - Deallocation success 100.00 % 100.00 % 1
Allocations - Pre-fail Allocations 61.60 % 61.44 % 1.00
Allocations - Average Allocation time 27497.77 Ticks (±1795.90 Ticks) 5860.58 Ticks (±98.43 Ticks) 4.69
Allocations - Average Allocation time (no fail) 28598.42 Ticks (±2106.69 Ticks) 6554.81 Ticks (±92.86 Ticks) 4.36
Allocations - Average Deallocation time 8525.58 Ticks (±2375.81 Ticks) 1805.01 Ticks (±250.35 Ticks) 4.72
mutex_benchmark Build Time 216.51 s 79.82 s 2.71
mutex_benchmark File Size 0.88 MB 0.86 MB 1.02
Mutex Stress Test Average Time per Iteration - 1 Threads 33.70 ns (±7.01 ns) 12.10 ns (±0.41 ns) 2.79
Mutex Stress Test Average Time per Iteration - 2 Threads 30.10 ns (±8.29 ns) 40.26 ns (±1.68 ns) 0.75

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

@sbutz
sbutz marked this pull request as ready for review September 7, 2026 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant