Skip to content

fix(paging): memory unmapping for RISC-V and ARM#2466

Merged
mkroening merged 2 commits into
hermit-os:mainfrom
zyuiop:fix/risc-mem-unmapping
Jun 17, 2026
Merged

fix(paging): memory unmapping for RISC-V and ARM#2466
mkroening merged 2 commits into
hermit-os:mainfrom
zyuiop:fix/risc-mem-unmapping

Conversation

@zyuiop

@zyuiop zyuiop commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

When testing #2462 on ARM/Risc, I encountered page faults when trying to map pages.

Turns out that the previous unmapping was wrongly recorded.

This PR fixes that.

@zyuiop zyuiop mentioned this pull request Jun 5, 2026
2 tasks
@zyuiop zyuiop force-pushed the fix/risc-mem-unmapping branch from 3ed66e8 to 2274e53 Compare June 5, 2026 20:43

@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: fdb2c8b Previous: 30cb3f9 Performance Ratio
startup_benchmark Build Time 77.81 s 78.59 s 0.99
startup_benchmark File Size 0.76 MB 0.76 MB 1.00
Startup Time - 1 core 0.74 s (±0.02 s) 0.73 s (±0.02 s) 1.02
Startup Time - 2 cores 0.76 s (±0.02 s) 0.75 s (±0.02 s) 1.01
Startup Time - 4 cores 0.76 s (±0.02 s) 0.76 s (±0.02 s) 1.00
multithreaded_benchmark Build Time 79.72 s 80.39 s 0.99
multithreaded_benchmark File Size 0.82 MB 0.82 MB 1.00
Multithreaded Pi Efficiency - 2 Threads 89.29 % (±6.81 %) 89.59 % (±5.95 %) 1.00
Multithreaded Pi Efficiency - 4 Threads 43.99 % (±2.24 %) 43.86 % (±2.44 %) 1.00
Multithreaded Pi Efficiency - 8 Threads 25.92 % (±1.49 %) 25.65 % (±1.39 %) 1.01
micro_benchmarks Build Time 82.07 s 87.27 s 0.94
micro_benchmarks File Size 0.82 MB 0.82 MB 1.00
Scheduling time - 1 thread 62.11 ticks (±1.72 ticks) 64.58 ticks (±2.95 ticks) 0.96
Scheduling time - 2 threads 35.06 ticks (±2.18 ticks) 35.27 ticks (±2.44 ticks) 0.99
Micro - Time for syscall (getpid) 2.69 ticks (±0.14 ticks) 2.72 ticks (±0.18 ticks) 0.99
Memcpy speed - (built_in) block size 4096 85784.30 MByte/s (±59149.73 MByte/s) 84336.36 MByte/s (±58124.47 MByte/s) 1.02
Memcpy speed - (built_in) block size 1048576 30917.00 MByte/s (±24928.66 MByte/s) 30954.90 MByte/s (±25149.11 MByte/s) 1.00
Memcpy speed - (built_in) block size 16777216 30085.79 MByte/s (±24731.81 MByte/s) 27618.34 MByte/s (±22854.11 MByte/s) 1.09
Memset speed - (built_in) block size 4096 85379.21 MByte/s (±58896.23 MByte/s) 84961.36 MByte/s (±58506.83 MByte/s) 1.00
Memset speed - (built_in) block size 1048576 31664.16 MByte/s (±25367.62 MByte/s) 31697.81 MByte/s (±25573.78 MByte/s) 1.00
Memset speed - (built_in) block size 16777216 30867.70 MByte/s (±25185.16 MByte/s) 28408.60 MByte/s (±23353.48 MByte/s) 1.09
Memcpy speed - (rust) block size 4096 75133.51 MByte/s (±52375.86 MByte/s) 74740.31 MByte/s (±52172.06 MByte/s) 1.01
Memcpy speed - (rust) block size 1048576 30792.27 MByte/s (±24882.95 MByte/s) 30989.85 MByte/s (±25131.37 MByte/s) 0.99
Memcpy speed - (rust) block size 16777216 30115.92 MByte/s (±24754.65 MByte/s) 27766.19 MByte/s (±22932.85 MByte/s) 1.08
Memset speed - (rust) block size 4096 75937.36 MByte/s (±52903.46 MByte/s) 75196.89 MByte/s (±52449.92 MByte/s) 1.01
Memset speed - (rust) block size 1048576 31552.90 MByte/s (±25333.64 MByte/s) 31748.80 MByte/s (±25574.00 MByte/s) 0.99
Memset speed - (rust) block size 16777216 30899.48 MByte/s (±25206.18 MByte/s) 28552.59 MByte/s (±23427.10 MByte/s) 1.08
alloc_benchmarks Build Time 81.27 s 81.63 s 1.00
alloc_benchmarks File Size 0.84 MB 0.84 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 5379.27 Ticks (±86.54 Ticks) 5722.73 Ticks (±63.96 Ticks) 0.94
Allocations - Average Allocation time (no fail) 5379.27 Ticks (±86.54 Ticks) 5722.73 Ticks (±63.96 Ticks) 0.94
Allocations - Average Deallocation time 652.37 Ticks (±110.67 Ticks) 1530.42 Ticks (±212.44 Ticks) 0.43
mutex_benchmark Build Time 80.84 s 80.99 s 1.00
mutex_benchmark File Size 0.82 MB 0.82 MB 1.00
Mutex Stress Test Average Time per Iteration - 1 Threads 12.16 ns (±0.37 ns) 12.10 ns (±0.36 ns) 1.00
Mutex Stress Test Average Time per Iteration - 2 Threads 16.72 ns (±0.60 ns) 17.00 ns (±3.01 ns) 0.98

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

@mkroening mkroening left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks! :)

@mkroening mkroening force-pushed the fix/risc-mem-unmapping branch from 2274e53 to 433f149 Compare June 17, 2026 10:46
@mkroening mkroening changed the title Fix memory unmap for Risc/ARM fix(paging): memory unmapping for RISC-V and ARM Jun 17, 2026
@mkroening mkroening added this pull request to the merge queue Jun 17, 2026
Merged via the queue into hermit-os:main with commit 56d863e Jun 17, 2026
20 checks passed
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