Skip to content

feat(smp): re-add an anti-spurious-wakeup feature#2470

Open
zyuiop wants to merge 2 commits into
hermit-os:mainfrom
zyuiop:feat/smp-reduce-interrupts
Open

feat(smp): re-add an anti-spurious-wakeup feature#2470
zyuiop wants to merge 2 commits into
hermit-os:mainfrom
zyuiop:feat/smp-reduce-interrupts

Conversation

@zyuiop

@zyuiop zyuiop commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

As a follow-up to #2468, try to re-implement the logic I removed previously, but this time avoiding any potential race condition (hopefully??).

This is a partial revert of commit f0bb0a0
@zyuiop zyuiop force-pushed the feat/smp-reduce-interrupts branch from 54cfef7 to b69fae2 Compare June 6, 2026 16:16

@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: 8e50433 Previous: 28c7089 Performance Ratio
startup_benchmark Build Time 109.65 s 115.28 s 0.95
startup_benchmark File Size 0.77 MB 0.77 MB 1.00
Startup Time - 1 core 0.99 s (±0.03 s) 1.00 s (±0.03 s) 0.99
Startup Time - 2 cores 1.00 s (±0.10 s) 1.04 s (±0.05 s) 0.96
Startup Time - 4 cores 1.01 s (±0.03 s) 1.00 s (±0.06 s) 1.01
multithreaded_benchmark Build Time 110.95 s 118.33 s 0.94
multithreaded_benchmark File Size 0.86 MB 0.87 MB 0.99
Multithreaded Pi Efficiency - 2 Threads 91.86 % (±14.28 %) 92.34 % (±11.70 %) 0.99
Multithreaded Pi Efficiency - 4 Threads 45.10 % (±6.94 %) 45.83 % (±5.87 %) 0.98
Multithreaded Pi Efficiency - 8 Threads 24.91 % (±4.00 %) 25.71 % (±3.50 %) 0.97
micro_benchmarks Build Time 93.21 s 96.08 s 0.97
micro_benchmarks File Size 0.87 MB 0.88 MB 0.99
Scheduling time - 1 thread 83.79 ticks (±4.37 ticks) 73.85 ticks (±3.74 ticks) 1.13
Scheduling time - 2 threads 44.00 ticks (±3.34 ticks) 41.46 ticks (±4.37 ticks) 1.06
Micro - Time for syscall (getpid) 3.09 ticks (±0.22 ticks) 3.08 ticks (±0.19 ticks) 1.00
Memcpy speed - (built_in) block size 4096 74047.13 MByte/s (±51126.70 MByte/s) 73208.48 MByte/s (±50616.82 MByte/s) 1.01
Memcpy speed - (built_in) block size 1048576 29446.16 MByte/s (±24172.51 MByte/s) 29392.18 MByte/s (±24125.47 MByte/s) 1.00
Memcpy speed - (built_in) block size 16777216 26197.50 MByte/s (±21606.90 MByte/s) 23751.74 MByte/s (±19605.56 MByte/s) 1.10
Memset speed - (built_in) block size 4096 74405.14 MByte/s (±51402.07 MByte/s) 73313.38 MByte/s (±50689.78 MByte/s) 1.01
Memset speed - (built_in) block size 1048576 30190.34 MByte/s (±24596.69 MByte/s) 30169.43 MByte/s (±24587.38 MByte/s) 1.00
Memset speed - (built_in) block size 16777216 26889.78 MByte/s (±22011.87 MByte/s) 24402.29 MByte/s (±20008.02 MByte/s) 1.10
Memcpy speed - (rust) block size 4096 64719.29 MByte/s (±45557.93 MByte/s) 66427.37 MByte/s (±46490.49 MByte/s) 0.97
Memcpy speed - (rust) block size 1048576 29450.61 MByte/s (±24228.47 MByte/s) 29425.11 MByte/s (±24175.79 MByte/s) 1.00
Memcpy speed - (rust) block size 16777216 26075.00 MByte/s (±21430.08 MByte/s) 24403.77 MByte/s (±20179.96 MByte/s) 1.07
Memset speed - (rust) block size 4096 65503.54 MByte/s (±46021.50 MByte/s) 66262.32 MByte/s (±46403.75 MByte/s) 0.99
Memset speed - (rust) block size 1048576 30209.40 MByte/s (±24655.82 MByte/s) 30172.11 MByte/s (±24599.55 MByte/s) 1.00
Memset speed - (rust) block size 16777216 26776.36 MByte/s (±21848.85 MByte/s) 25069.95 MByte/s (±20590.63 MByte/s) 1.07
alloc_benchmarks Build Time 90.60 s 91.43 s 0.99
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 4702.60 Ticks (±64.22 Ticks) 4633.96 Ticks (±62.19 Ticks) 1.01
Allocations - Average Allocation time (no fail) 4702.60 Ticks (±64.22 Ticks) 4633.96 Ticks (±62.19 Ticks) 1.01
Allocations - Average Deallocation time 1106.71 Ticks (±131.38 Ticks) 683.28 Ticks (±99.25 Ticks) 1.62
mutex_benchmark Build Time 90.97 s 90.68 s 1.00
mutex_benchmark File Size 0.87 MB 0.88 MB 0.99
Mutex Stress Test Average Time per Iteration - 1 Threads 13.70 ns (±0.64 ns) 13.82 ns (±0.84 ns) 0.99
Mutex Stress Test Average Time per Iteration - 2 Threads 17.30 ns (±2.33 ns) 14.48 ns (±0.75 ns) 1.19

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

This one has tons of comments to convince myself it works. I am relatively convinced, but concurrent processing is hard you know?
@zyuiop zyuiop force-pushed the feat/smp-reduce-interrupts branch from b69fae2 to 8e50433 Compare June 6, 2026 17:00
@mkroening mkroening self-requested a review June 8, 2026 13:47
@mkroening mkroening self-assigned this Jun 8, 2026
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