Skip to content

Conversation

@fogti
Copy link
Contributor

@fogti fogti commented Dec 11, 2025

It felt quite odd to use two completely different resolution mechanisms for cargo.

@fogti
Copy link
Contributor Author

fogti commented Dec 11, 2025

After rust-osdev/ovmf-prebuilt#239 (or such) is merged, it would be probably possible to get rid of the flate2 dependency of ureq entirely.

Copy link
Member

@mkroening mkroening left a comment

Choose a reason for hiding this comment

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

I'm torn on this. The reason the sanitized cargo exists is that building the kernel and building example applications need to make sure to make Rustup's Cargo proxy.

The other uses of Cargo don't need this. Xshell was chosen for its scripting-like ease of use in the other cases.

The ureq change can be merged separately, right? Please keep it in alphabetical order and don't use tabular format.

@mkroening mkroening self-assigned this Dec 11, 2025
@fogti fogti force-pushed the improve-xtask branch 2 times, most recently from 899f2f8 to 00994cb Compare December 11, 2025 13:43
@fogti
Copy link
Contributor Author

fogti commented Dec 11, 2025

Okay, I split the part which messes around with dependencies into #2132.

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: 1c99f60 Previous: 52aa3f4 Performance Ratio
startup_benchmark Build Time 114.25 s 115.13 s 0.99
startup_benchmark File Size 0.87 MB 0.87 MB 1.00
Startup Time - 1 core 1.00 s (±0.02 s) 0.96 s (±0.02 s) 1.05
Startup Time - 2 cores 1.00 s (±0.03 s) 0.97 s (±0.02 s) 1.03
Startup Time - 4 cores 1.01 s (±0.02 s) 0.99 s (±0.04 s) 1.02
multithreaded_benchmark Build Time 117.50 s 117.46 s 1.00
multithreaded_benchmark File Size 0.97 MB 0.97 MB 1.00
Multithreaded Pi Efficiency - 2 Threads 92.45 % (±8.74 %) 89.90 % (±8.53 %) 1.03
Multithreaded Pi Efficiency - 4 Threads 45.24 % (±3.19 %) 44.03 % (±3.56 %) 1.03
Multithreaded Pi Efficiency - 8 Threads 25.75 % (±1.73 %) 25.43 % (±1.13 %) 1.01
micro_benchmarks Build Time 204.41 s 205.72 s 0.99
micro_benchmarks File Size 0.98 MB 0.98 MB 1.00
Scheduling time - 1 thread 73.88 ticks (±3.54 ticks) 75.99 ticks (±3.44 ticks) 0.97
Scheduling time - 2 threads 61.12 ticks (±17.78 ticks) 57.42 ticks (±19.04 ticks) 1.06
Micro - Time for syscall (getpid) 4.74 ticks (±0.31 ticks) 4.79 ticks (±0.32 ticks) 0.99
Memcpy speed - (built_in) block size 4096 56230.93 MByte/s (±39835.05 MByte/s) 55141.43 MByte/s (±39045.94 MByte/s) 1.02
Memcpy speed - (built_in) block size 1048576 29026.75 MByte/s (±24326.60 MByte/s) 28433.61 MByte/s (±23758.34 MByte/s) 1.02
Memcpy speed - (built_in) block size 16777216 22365.36 MByte/s (±18879.72 MByte/s) 26629.71 MByte/s (±22366.20 MByte/s) 0.84
Memset speed - (built_in) block size 4096 56996.95 MByte/s (±40393.72 MByte/s) 55434.09 MByte/s (±39238.17 MByte/s) 1.03
Memset speed - (built_in) block size 1048576 29461.13 MByte/s (±24488.91 MByte/s) 29247.17 MByte/s (±24233.73 MByte/s) 1.01
Memset speed - (built_in) block size 16777216 22654.79 MByte/s (±18988.25 MByte/s) 27017.06 MByte/s (±22507.35 MByte/s) 0.84
Memcpy speed - (rust) block size 4096 49801.08 MByte/s (±36415.58 MByte/s) 51653.42 MByte/s (±37465.88 MByte/s) 0.96
Memcpy speed - (rust) block size 1048576 28965.38 MByte/s (±24258.23 MByte/s) 28526.07 MByte/s (±23780.07 MByte/s) 1.02
Memcpy speed - (rust) block size 16777216 23319.72 MByte/s (±19751.48 MByte/s) 26406.45 MByte/s (±22136.69 MByte/s) 0.88
Memset speed - (rust) block size 4096 50467.51 MByte/s (±36869.50 MByte/s) 52383.36 MByte/s (±37932.30 MByte/s) 0.96
Memset speed - (rust) block size 1048576 29807.47 MByte/s (±24750.97 MByte/s) 29339.64 MByte/s (±24250.24 MByte/s) 1.02
Memset speed - (rust) block size 16777216 23600.27 MByte/s (±19851.94 MByte/s) 26877.78 MByte/s (±22333.36 MByte/s) 0.88
alloc_benchmarks Build Time 198.31 s 188.73 s 1.05
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 9008.09 Ticks (±99.90 Ticks) 8899.94 Ticks (±109.88 Ticks) 1.01
Allocations - Average Allocation time (no fail) 9008.09 Ticks (±99.90 Ticks) 8899.94 Ticks (±109.88 Ticks) 1.01
Allocations - Average Deallocation time 1460.13 Ticks (±451.10 Ticks) 1937.45 Ticks (±495.96 Ticks) 0.75
mutex_benchmark Build Time 201.86 s 190.92 s 1.06
mutex_benchmark File Size 0.98 MB 0.98 MB 1.00
Mutex Stress Test Average Time per Iteration - 1 Threads 16.66 ns (±0.79 ns) 16.00 ns (±0.80 ns) 1.04
Mutex Stress Test Average Time per Iteration - 2 Threads 19.20 ns (±2.10 ns) 19.16 ns (±2.29 ns) 1.00

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

Copy link
Member

@mkroening mkroening left a comment

Choose a reason for hiding this comment

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

I have refactored the code a bit.

When testing, I noticed and remembered the reason I would rather not use the proxy explicitly for these development tasks:

cargo clippy --target=x86_64-unknown-none --all-targets
cd "/Users/mkroening/devel/hermit-rs/kernel" && env -u CARGO -u CARGO_MANIFEST_DIR -u CARGO_MANIFEST_PATH -u CARGO_PKG_AUTHORS -u CARGO_PKG_DESCRIPTION -u CARGO_PKG_HOMEPAGE -u CARGO_PKG_LICENSE -u CARGO_PKG_LICENSE_FILE -u CARGO_PKG_NAME -u CARGO_PKG_README -u CARGO_PKG_REPOSITORY -u CARGO_PKG_RUST_VERSION -u CARGO_PKG_VERSION -u CARGO_PKG_VERSION_MAJOR -u CARGO_PKG_VERSION_MINOR -u CARGO_PKG_VERSION_PATCH -u CARGO_PKG_VERSION_PRE -u LD_LIBRARY_PATH -u RUSTUP_TOOLCHAIN -u RUST_RECURSION_COUNT "/Users/mkroening/.cargo/bin/cargo" "clippy" "--all-targets" "--target=x86_64-unknown-none"

I strongly prefer the top for development purposes. I'll cherry-pick a few of these changes, but overall I think we can close this PR. Does this work for you? :)

@fogti
Copy link
Contributor Author

fogti commented Dec 29, 2025

Yes, this works for me.

@fogti fogti closed this Dec 29, 2025
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