Skip to content

Conversation

@Gelbpunkt
Copy link
Member

@Gelbpunkt Gelbpunkt commented Nov 27, 2025

This refactors our timer interrupt handling into a separate module that all timer interrupts are configured through and handled by. It allows us to track why a timer interrupt was fired.

We make use of this to now only conditionally wake the network task's waker when necessary. This is either because we sent some network packets, a network device driver received an interrupt, or because a timer interrupt that we configured so we can poll smoltcp in the future was handled.

@mkroening mkroening self-assigned this Nov 27, 2025
@Gelbpunkt Gelbpunkt force-pushed the wakers branch 2 times, most recently from 9c652d1 to c03dc8e Compare November 27, 2025 11:27
Copy link
Contributor

@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: 839554d Previous: b7cb4d3 Performance Ratio
startup_benchmark Build Time 95.57 s 95.39 s 1.00
startup_benchmark File Size 0.87 MB 0.87 MB 1.00
Startup Time - 1 core 0.92 s (±0.03 s) 0.95 s (±0.03 s) 0.96
Startup Time - 2 cores 0.92 s (±0.03 s) 0.94 s (±0.02 s) 0.97
Startup Time - 4 cores 0.93 s (±0.03 s) 0.95 s (±0.03 s) 0.98
multithreaded_benchmark Build Time 97.45 s 97.97 s 0.99
multithreaded_benchmark File Size 0.97 MB 0.96 MB 1.01
Multithreaded Pi Efficiency - 2 Threads 86.21 % (±9.00 %) 88.61 % (±8.44 %) 0.97
Multithreaded Pi Efficiency - 4 Threads 43.34 % (±3.90 %) 44.21 % (±3.71 %) 0.98
Multithreaded Pi Efficiency - 8 Threads 25.42 % (±2.12 %) 25.40 % (±1.53 %) 1.00
micro_benchmarks Build Time 157.55 s 158.02 s 1.00
micro_benchmarks File Size 0.98 MB 0.97 MB 1.01
Scheduling time - 1 thread 86.32 ticks (±22.44 ticks) 88.34 ticks (±28.97 ticks) 0.98
Scheduling time - 2 threads 57.60 ticks (±16.16 ticks) 52.82 ticks (±18.73 ticks) 1.09
Micro - Time for syscall (getpid) 6.51 ticks (±3.15 ticks) 7.05 ticks (±3.50 ticks) 0.92
Memcpy speed - (built_in) block size 4096 60462.70 MByte/s (±43054.81 MByte/s) 64404.99 MByte/s (±45346.73 MByte/s) 0.94
Memcpy speed - (built_in) block size 1048576 25275.60 MByte/s (±21771.72 MByte/s) 25799.47 MByte/s (±21948.86 MByte/s) 0.98
Memcpy speed - (built_in) block size 16777216 21153.73 MByte/s (±17811.28 MByte/s) 21547.08 MByte/s (±18079.09 MByte/s) 0.98
Memset speed - (built_in) block size 4096 60481.45 MByte/s (±43066.10 MByte/s) 65068.02 MByte/s (±45778.39 MByte/s) 0.93
Memset speed - (built_in) block size 1048576 26110.44 MByte/s (±22334.65 MByte/s) 26422.24 MByte/s (±22265.98 MByte/s) 0.99
Memset speed - (built_in) block size 16777216 21283.06 MByte/s (±17842.45 MByte/s) 21722.36 MByte/s (±18132.01 MByte/s) 0.98
Memcpy speed - (rust) block size 4096 55136.69 MByte/s (±39987.82 MByte/s) 55185.68 MByte/s (±40573.24 MByte/s) 1.00
Memcpy speed - (rust) block size 1048576 23613.08 MByte/s (±20028.01 MByte/s) 25175.07 MByte/s (±21514.75 MByte/s) 0.94
Memcpy speed - (rust) block size 16777216 21482.96 MByte/s (±17990.24 MByte/s) 21640.59 MByte/s (±18080.92 MByte/s) 0.99
Memset speed - (rust) block size 4096 55834.17 MByte/s (±40410.41 MByte/s) 55727.88 MByte/s (±40923.17 MByte/s) 1.00
Memset speed - (rust) block size 1048576 24181.44 MByte/s (±20283.58 MByte/s) 26092.83 MByte/s (±22137.53 MByte/s) 0.93
Memset speed - (rust) block size 16777216 21710.48 MByte/s (±18067.61 MByte/s) 21761.68 MByte/s (±18109.21 MByte/s) 1.00
alloc_benchmarks Build Time 149.24 s 149.22 s 1.00
alloc_benchmarks File Size 0.94 MB 0.94 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 13843.81 Ticks (±369.95 Ticks) 13984.99 Ticks (±472.85 Ticks) 0.99
Allocations - Average Allocation time (no fail) 13843.81 Ticks (±369.95 Ticks) 13984.99 Ticks (±472.85 Ticks) 0.99
Allocations - Average Deallocation time 1191.15 Ticks (±358.52 Ticks) 1265.09 Ticks (±504.23 Ticks) 0.94
mutex_benchmark Build Time 151.13 s 150.29 s 1.01
mutex_benchmark File Size 0.98 MB 0.97 MB 1.01
Mutex Stress Test Average Time per Iteration - 1 Threads 18.22 ns (±3.78 ns) 17.84 ns (±3.62 ns) 1.02
Mutex Stress Test Average Time per Iteration - 2 Threads 30.36 ns (±12.51 ns) 19.72 ns (±2.19 ns) 1.54

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

@Gelbpunkt Gelbpunkt force-pushed the wakers branch 8 times, most recently from 390c379 to 466882e Compare December 22, 2025 09:45
@mkroening mkroening self-requested a review December 22, 2025 10:12
@Gelbpunkt Gelbpunkt marked this pull request as ready for review December 22, 2025 10:13
@Gelbpunkt Gelbpunkt force-pushed the wakers branch 2 times, most recently from 4d2ac36 to f48f443 Compare January 8, 2026 10:18
This refactors our timer interrupt handling into a separate module that
all timer interrupts are configured through and handled by. It allows us
to track why a timer interrupt was fired.

We make use of this to now only conditionally wake the network task's
waker when necessary. This is either because we sent some network
packets, a network device driver received an interrupt, or because a
timer interrupt that we configured so we can poll smoltcp in the future
was handled.
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