feat: stub inode numbers and fcntl result#2454
Conversation
There was a problem hiding this comment.
Benchmark Results
Details
| Benchmark | Current: 75490fd | Previous: 30cb3f9 | Performance Ratio |
|---|---|---|---|
| startup_benchmark Build Time | 78.31 s |
78.59 s |
1.00 ❗ |
| startup_benchmark File Size | 0.76 MB |
0.76 MB |
1.00 ❗ |
| Startup Time - 1 core | 0.74 s (±0.03 s) |
0.73 s (±0.02 s) |
1.01 |
| Startup Time - 2 cores | 0.74 s (±0.02 s) |
0.75 s (±0.02 s) |
0.99 |
| Startup Time - 4 cores | 0.74 s (±0.02 s) |
0.76 s (±0.02 s) |
0.98 |
| multithreaded_benchmark Build Time | 77.94 s |
80.39 s |
0.97 ❗ |
| multithreaded_benchmark File Size | 0.86 MB |
0.82 MB |
1.05 ❗ |
| Multithreaded Pi Efficiency - 2 Threads | 89.46 % (±6.94 %) |
89.59 % (±5.95 %) |
1.00 |
| Multithreaded Pi Efficiency - 4 Threads | 44.26 % (±2.30 %) |
43.86 % (±2.44 %) |
1.01 |
| Multithreaded Pi Efficiency - 8 Threads | 25.70 % (±1.11 %) |
25.65 % (±1.39 %) |
1.00 |
| micro_benchmarks Build Time | 82.23 s |
87.27 s |
0.94 ❗ |
| micro_benchmarks File Size | 0.86 MB |
0.82 MB |
1.05 ❗ |
| Scheduling time - 1 thread | 66.07 ticks (±2.43 ticks) |
64.58 ticks (±2.95 ticks) |
1.02 |
| Scheduling time - 2 threads | 38.19 ticks (±3.92 ticks) |
35.27 ticks (±2.44 ticks) |
1.08 |
| Micro - Time for syscall (getpid) | 3.34 ticks (±0.15 ticks) |
2.72 ticks (±0.18 ticks) |
1.23 ❗ |
| Memcpy speed - (built_in) block size 4096 | 81693.10 MByte/s (±56430.32 MByte/s) |
84336.36 MByte/s (±58124.47 MByte/s) |
0.97 |
| Memcpy speed - (built_in) block size 1048576 | 30798.10 MByte/s (±24876.78 MByte/s) |
30954.90 MByte/s (±25149.11 MByte/s) |
0.99 |
| Memcpy speed - (built_in) block size 16777216 | 29957.70 MByte/s (±24637.55 MByte/s) |
27618.34 MByte/s (±22854.11 MByte/s) |
1.08 |
| Memset speed - (built_in) block size 4096 | 82036.85 MByte/s (±56664.86 MByte/s) |
84961.36 MByte/s (±58506.83 MByte/s) |
0.97 |
| Memset speed - (built_in) block size 1048576 | 31525.51 MByte/s (±25305.28 MByte/s) |
31697.81 MByte/s (±25573.78 MByte/s) |
0.99 |
| Memset speed - (built_in) block size 16777216 | 30729.89 MByte/s (±25079.28 MByte/s) |
28408.60 MByte/s (±23353.48 MByte/s) |
1.08 |
| Memcpy speed - (rust) block size 4096 | 74324.39 MByte/s (±51923.79 MByte/s) |
74740.31 MByte/s (±52172.06 MByte/s) |
0.99 |
| Memcpy speed - (rust) block size 1048576 | 30799.08 MByte/s (±24913.16 MByte/s) |
30989.85 MByte/s (±25131.37 MByte/s) |
0.99 |
| Memcpy speed - (rust) block size 16777216 | 29981.74 MByte/s (±24657.42 MByte/s) |
27766.19 MByte/s (±22932.85 MByte/s) |
1.08 |
| Memset speed - (rust) block size 4096 | 74849.84 MByte/s (±52307.60 MByte/s) |
75196.89 MByte/s (±52449.92 MByte/s) |
1.00 |
| Memset speed - (rust) block size 1048576 | 31547.94 MByte/s (±25346.19 MByte/s) |
31748.80 MByte/s (±25574.00 MByte/s) |
0.99 |
| Memset speed - (rust) block size 16777216 | 30747.56 MByte/s (±25094.03 MByte/s) |
28552.59 MByte/s (±23427.10 MByte/s) |
1.08 |
| alloc_benchmarks Build Time | 80.97 s |
81.63 s |
0.99 ❗ |
| 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 | 5458.83 Ticks (±77.42 Ticks) |
5722.73 Ticks (±63.96 Ticks) |
0.95 ❗ |
| Allocations - Average Allocation time (no fail) | 5458.83 Ticks (±77.42 Ticks) |
5722.73 Ticks (±63.96 Ticks) |
0.95 ❗ |
| Allocations - Average Deallocation time | 686.16 Ticks (±114.62 Ticks) |
1530.42 Ticks (±212.44 Ticks) |
0.45 ❗ |
| mutex_benchmark Build Time | 81.63 s |
80.99 s |
1.01 ❗ |
| mutex_benchmark File Size | 0.87 MB |
0.82 MB |
1.05 ❗ |
| Mutex Stress Test Average Time per Iteration - 1 Threads | 12.16 ns (±0.42 ns) |
12.10 ns (±0.36 ns) |
1.00 |
| Mutex Stress Test Average Time per Iteration - 2 Threads | 14.72 ns (±0.60 ns) |
17.00 ns (±3.01 ns) |
0.87 |
This comment was automatically generated by workflow using github-action-benchmark.
| } else if cfg!(feature = "syscall-fake-values") { | ||
| warn!("[syscall-fake-values] Unknown fcntl flag {cmd} {arg}, returning 0"); | ||
| 0 |
There was a problem hiding this comment.
What scenario needs this? Which command is provided?
| if access_option.contains(AccessOption::F_OK) && access_option != AccessOption::F_OK { | ||
| return -i32::from(Errno::Inval); | ||
| } |
| #[cfg(feature = "syscall-fake-values")] | ||
| st_nlink: 1, | ||
| #[cfg(feature = "syscall-fake-values")] | ||
| st_blksize: 4096, | ||
| #[cfg(feature = "syscall-fake-values")] | ||
| st_ino: VFS_INO_NUM.fetch_add(1, Ordering::AcqRel), |
There was a problem hiding this comment.
Which program needs these values? I wonder whether we should just fake them all the time.
|
Sadly I don't precisely remember which programs required these stubs :( It has to be one of the following: Lighttpd, Valkey, or Axum. Sorry for not being more precise |
|
No worries! I have cherry-picked the noncontroversial changes:
Here, I'd also like to avoid the feature. I think it would be best to identify the programs that need the specific workarounds or argue that the stub values are always fine. |
|
I'll remove the feature flag, I only added it when making this PR public because I did not know if you would like having the stubs unconditionnally :) |
|
I'll update this branch to remove the three cherry picked commits, and remove the feature flag |
# Conflicts: # Cargo.toml # src/syscalls/mod.rs
In the process of porting some applications (C) for Hermit, we had to implement a few stub values. I have gated them behind a compilation flag.
In addition, we also fix a few problems/incompatibilities.