Skip to content

fix(mm): don't account for kernel executable memory twice - #2593

Merged
mkroening merged 1 commit into
mainfrom
min-mem
Aug 3, 2026
Merged

fix(mm): don't account for kernel executable memory twice#2593
mkroening merged 1 commit into
mainfrom
min-mem

Conversation

@mkroening

@mkroening mkroening commented Aug 2, 2026

Copy link
Copy Markdown
Member

physicalmem::total_memory_size() already accounts for the kernel executable.

This reduces the minimum QEMU memory amount for x86-64 hello_world from 29M to 19M.

Found this while preparing #2546.

@mkroening mkroening self-assigned this Aug 2, 2026
`physicalmem::total_memory_size()` already accounts for the kernel executable.

@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: 7eb707f Previous: 2e23902 Performance Ratio
startup_benchmark Build Time 82.70 s 80.34 s 1.03
startup_benchmark File Size 0.79 MB 0.80 MB 0.99
Startup Time - 1 core 0.75 s (±0.02 s) 0.75 s (±0.02 s) 1.00
Startup Time - 2 cores 0.75 s (±0.02 s) 0.74 s (±0.02 s) 1.02
Startup Time - 4 cores 0.75 s (±0.02 s) 0.74 s (±0.02 s) 1.01
multithreaded_benchmark Build Time 84.56 s 82.11 s 1.03
multithreaded_benchmark File Size 0.86 MB 0.86 MB 1.01
Multithreaded Pi Efficiency - 2 Threads 88.96 % (±8.36 %) 85.89 % (±6.61 %) 1.04
Multithreaded Pi Efficiency - 4 Threads 44.29 % (±4.15 %) 43.43 % (±2.56 %) 1.02
Multithreaded Pi Efficiency - 8 Threads 25.26 % (±1.78 %) 25.76 % (±1.53 %) 0.98
micro_benchmarks Build Time 83.72 s 80.40 s 1.04
micro_benchmarks File Size 0.87 MB 0.86 MB 1.01
Scheduling time - 1 thread 62.31 ticks (±3.88 ticks) 62.65 ticks (±4.06 ticks) 0.99
Scheduling time - 2 threads 35.15 ticks (±4.84 ticks) 34.08 ticks (±4.10 ticks) 1.03
Micro - Time for syscall (getpid) 3.38 ticks (±0.58 ticks) 3.45 ticks (±0.58 ticks) 0.98
Memcpy speed - (built_in) block size 4096 82949.40 MByte/s (±57364.62 MByte/s) 82448.38 MByte/s (±56997.13 MByte/s) 1.01
Memcpy speed - (built_in) block size 1048576 30289.77 MByte/s (±24476.77 MByte/s) 30585.98 MByte/s (±24707.84 MByte/s) 0.99
Memcpy speed - (built_in) block size 16777216 26805.72 MByte/s (±22103.14 MByte/s) 26340.06 MByte/s (±21720.96 MByte/s) 1.02
Memset speed - (built_in) block size 4096 83335.27 MByte/s (±57619.69 MByte/s) 82292.76 MByte/s (±56891.50 MByte/s) 1.01
Memset speed - (built_in) block size 1048576 31028.96 MByte/s (±24905.23 MByte/s) 31323.85 MByte/s (±25145.86 MByte/s) 0.99
Memset speed - (built_in) block size 16777216 27559.05 MByte/s (±22573.31 MByte/s) 27104.68 MByte/s (±22209.94 MByte/s) 1.02
Memcpy speed - (rust) block size 4096 74441.43 MByte/s (±51653.66 MByte/s) 74097.96 MByte/s (±51811.44 MByte/s) 1.00
Memcpy speed - (rust) block size 1048576 30319.61 MByte/s (±24580.54 MByte/s) 30361.60 MByte/s (±24602.37 MByte/s) 1.00
Memcpy speed - (rust) block size 16777216 27216.98 MByte/s (±22499.24 MByte/s) 27625.34 MByte/s (±22806.88 MByte/s) 0.99
Memset speed - (rust) block size 4096 74458.24 MByte/s (±51664.25 MByte/s) 74373.47 MByte/s (±51976.48 MByte/s) 1.00
Memset speed - (rust) block size 1048576 31046.46 MByte/s (±24991.67 MByte/s) 31110.89 MByte/s (±25033.24 MByte/s) 1.00
Memset speed - (rust) block size 16777216 27977.74 MByte/s (±22967.72 MByte/s) 28386.93 MByte/s (±23265.03 MByte/s) 0.99
alloc_benchmarks Build Time 77.68 s 74.76 s 1.04
alloc_benchmarks File Size 0.87 MB 0.87 MB 1.00
Allocations - Allocation success 91.35 % 91.31 % 1.00
Allocations - Deallocation success 100.00 % 100.00 % 1
Allocations - Pre-fail Allocations 61.53 % 61.44 % 1.00
Allocations - Average Allocation time 4553.57 Ticks (±150.62 Ticks) 5860.58 Ticks (±98.43 Ticks) 0.78
Allocations - Average Allocation time (no fail) 5283.28 Ticks (±140.94 Ticks) 6554.81 Ticks (±92.86 Ticks) 0.81
Allocations - Average Deallocation time 1058.46 Ticks (±160.13 Ticks) 1805.01 Ticks (±250.35 Ticks) 0.59
mutex_benchmark Build Time 81.55 s 79.82 s 1.02
mutex_benchmark File Size 0.87 MB 0.86 MB 1.01
Mutex Stress Test Average Time per Iteration - 1 Threads 12.30 ns (±0.46 ns) 12.10 ns (±0.41 ns) 1.02
Mutex Stress Test Average Time per Iteration - 2 Threads 42.42 ns (±2.05 ns) 40.26 ns (±1.68 ns) 1.05

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

@mkroening
mkroening marked this pull request as ready for review August 2, 2026 18:58
@mkroening
mkroening requested a review from stlankes August 2, 2026 18:59
@mkroening
mkroening added this pull request to the merge queue Aug 3, 2026
Merged via the queue into main with commit d2abae5 Aug 3, 2026
23 checks passed
@mkroening
mkroening deleted the min-mem branch August 3, 2026 08:39
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.

1 participant