Skip to content

feat: support futures in host and guest calls - #2107

Draft
andreiltd wants to merge 1 commit into
tandr/streams/byte-streamsfrom
tandr/streams/futures
Draft

andreiltd wants to merge 1 commit into
tandr/streams/byte-streamsfrom
tandr/streams/futures

Conversation

@andreiltd

Copy link
Copy Markdown
Member

Stack created with GitHub Stacks CLI • Give Feedback 💬

Signed-off-by: Tomasz Andrzejak <andreiltd@gmail.com>
@andreiltd
andreiltd added this pull request to stack #2110 November 25, 2026 17:58
@andreiltd andreiltd changed the title tandr/streams/futures feat: support futures in host and guest calls Nov 25, 2026
@andreiltd andreiltd added the C-enhancement For PRs adding features, improving functionality, docs, tests, etc. label Nov 25, 2026
@hyperlight-gh-bot

Copy link
Copy Markdown

Benchmark Results

Measured commit: 31665a70f4c9
Baseline commit: e89d90903530

kvm / amd (Linux) (âž– stable)

No benchmark improved or regressed.

Benchmark Results

function_call_codec

encode_control decode_vec_bytes_copy
byte_chunks 262.70 ns (âž– 1.00x slower)
vec_bytes 73.29 ns (âž– 1.01x slower)
372.16 µs (➖ 1.00x slower)

payload_allocation

slot_pool_segmented
65536 141.31 ns (âž– 1.00x faster)
262144 521.78 ns (âž– 1.00x faster)

sandboxes

create_initialized_and_drop
medium 13.57 ms (âž– 1.02x faster)

slot_pool

alloc_dealloc_4096 alloc_dealloc_1500 alloc_dealloc_128
7.73 ns (âž– 1.00x faster) 7.73 ns (âž– 1.00x slower) 7.77 ns (âž– 1.01x slower)

snapshot_files

load_snapshot_unverified
small 104.07 µs (➖ 1.03x faster)

virtq_readonly

slot_pool_segmented slot_pool_segmented_fragmented
65536 1.95 µs (➖ 1.08x faster) 2.05 µs (➖ 1.08x slower)
262144 7.75 µs (➖ 1.08x slower) 7.27 µs (➖ 1.03x slower)

virtq_readwrite

slot_pool_segmented slot_pool_segmented_fragmented
65536 6.15 µs (➖ 1.17x faster) 6.12 µs (➖ 1.03x faster)
262144 28.36 µs (➖ 1.03x slower)
8192 1.03 µs (➖ 1.00x slower) 1.06 µs (➖ 1.05x slower)
kvm / intel (Linux) (âž– stable)

No benchmark improved or regressed.

Benchmark Results

function_call_codec

encode_control decode_vec_bytes_copy
byte_chunks 258.74 ns (âž– 1.18x faster)
vec_bytes 78.39 ns (âž– 1.03x faster)
670.55 µs (➖ 1.00x faster)

payload_allocation

slot_pool_segmented
65536 140.70 ns (âž– 1.08x faster)
262144 519.13 ns (âž– 1.08x faster)

sandboxes

create_initialized_and_drop
medium 15.16 ms (âž– 1.05x faster)

slot_pool

alloc_dealloc_4096 alloc_dealloc_1500 alloc_dealloc_128
7.45 ns (âž– 1.03x faster) 7.46 ns (âž– 1.03x faster) 7.47 ns (âž– 1.03x faster)

snapshot_files

load_snapshot_unverified
small 56.81 µs (➖ 1.00x faster)

virtq_readonly

slot_pool_segmented slot_pool_segmented_fragmented
65536 2.25 µs (➖ 1.03x faster) 2.23 µs (➖ 1.05x faster)
262144 7.98 µs (➖ 1.05x faster) 7.98 µs (➖ 1.04x faster)

virtq_readwrite

slot_pool_segmented slot_pool_segmented_fragmented
65536 7.70 µs (➖ 1.02x slower) 7.57 µs (➖ 1.01x slower)
262144 31.14 µs (➖ 1.04x faster)
8192 768.79 ns (âž– 1.00x slower) 772.13 ns (âž– 1.03x faster)
mshv3 / amd (Linux) (âž– stable)

No benchmark improved or regressed.

Benchmark Results

function_call_codec

encode_control decode_vec_bytes_copy
byte_chunks 379.92 ns (âž– 1.02x slower)
vec_bytes 97.33 ns (âž– 1.03x faster)
266.29 µs (➖ 1.01x slower)

payload_allocation

slot_pool_segmented
65536 192.13 ns (âž– 1.01x faster)
262144 728.15 ns (âž– 1.01x faster)

sandboxes

create_initialized_and_drop
medium 63.92 ms (âž– 1.01x slower)

slot_pool

alloc_dealloc_4096 alloc_dealloc_1500 alloc_dealloc_128
9.87 ns (âž– 1.01x faster) 10.08 ns (âž– 1.02x slower) 9.88 ns (âž– 1.00x slower)

snapshot_files

load_snapshot_unverified
small 98.60 µs (➖ 1.01x slower)

virtq_readonly

slot_pool_segmented slot_pool_segmented_fragmented
65536 2.24 µs (➖ 1.01x faster) 2.68 µs (➖ 1.10x slower)
262144 9.93 µs (➖ 1.01x slower) 10.04 µs (➖ 1.00x faster)

virtq_readwrite

slot_pool_segmented slot_pool_segmented_fragmented
65536 8.32 µs (➖ 1.15x faster) 8.32 µs (➖ 1.12x faster)
262144 36.04 µs (➖ 1.03x faster)
8192 1.24 µs (➖ 1.02x faster) 1.24 µs (➖ 1.04x faster)
mshv3 / intel (Linux) (âž– stable)

No benchmark improved or regressed.

Benchmark Results

function_call_codec

encode_control decode_vec_bytes_copy
byte_chunks 350.88 ns (âž– 1.15x faster)
vec_bytes 85.68 ns (âž– 1.02x slower)
674.32 µs (➖ 1.01x slower)

payload_allocation

slot_pool_segmented
65536 180.85 ns (âž– 1.01x slower)
262144 631.27 ns (âž– 1.00x faster)

sandboxes

create_initialized_and_drop
medium 51.56 ms (âž– 1.43x faster)

slot_pool

alloc_dealloc_4096 alloc_dealloc_1500 alloc_dealloc_128
8.66 ns (âž– 1.00x faster) 9.07 ns (âž– 1.01x faster) 8.87 ns (âž– 1.02x slower)

snapshot_files

load_snapshot_unverified
small 50.78 µs (➖ 1.01x faster)

virtq_readonly

slot_pool_segmented slot_pool_segmented_fragmented
65536 2.39 µs (➖ 1.06x slower) 2.26 µs (➖ 1.00x faster)
262144 7.89 µs (➖ 1.00x slower) 7.91 µs (➖ 1.01x slower)

virtq_readwrite

slot_pool_segmented slot_pool_segmented_fragmented
65536 7.39 µs (➖ 1.00x faster) 7.50 µs (➖ 1.01x faster)
262144 38.67 µs (➖ 1.06x faster)
8192 896.39 ns (âž– 1.03x faster) 905.50 ns (âž– 1.04x faster)
hyperv-ws2025 / amd (Windows) (âž– stable)

No benchmark improved or regressed.

Benchmark Results

function_call_codec

encode_control decode_vec_bytes_copy
byte_chunks 545.33 ns (âž– 1.05x faster)
vec_bytes 146.67 ns (âž– 1.00x faster)
2.02 ms (âž– 1.03x slower)

payload_allocation

slot_pool_segmented
65536 232.50 ns (âž– 1.02x slower)
262144 794.50 ns (âž– 1.00x slower)

sandboxes

create_initialized_and_drop
medium 13.29 ms (âž– 1.05x slower)

slot_pool

alloc_dealloc_4096 alloc_dealloc_1500 alloc_dealloc_128
10.36 ns (âž– 1.00x slower) 10.11 ns (âž– 1.00x slower) 10.41 ns (âž– 1.01x faster)

snapshot_files

load_snapshot_unverified
small 717.48 µs (➖ 1.04x slower)

virtq_readonly

slot_pool_segmented slot_pool_segmented_fragmented
65536 2.31 µs (➖ 1.02x faster) 2.33 µs (➖ 1.02x faster)
262144 8.91 µs (➖ 1.06x faster) 9.08 µs (➖ 1.04x faster)

virtq_readwrite

slot_pool_segmented slot_pool_segmented_fragmented
65536 8.85 µs (➖ 1.01x slower) 9.01 µs (➖ 1.01x faster)
262144 39.98 µs (➖ 1.04x slower)
8192 1.30 µs (➖ 1.02x slower) 1.30 µs (➖ 1.02x slower)
hyperv-ws2025 / intel (Windows) (âž– stable)

No benchmark improved or regressed.

Benchmark Results

function_call_codec

encode_control decode_vec_bytes_copy
byte_chunks 499.73 ns (âž– 1.07x slower)
vec_bytes 121.99 ns (âž– 1.01x slower)
3.28 ms (âž– 1.00x faster)

payload_allocation

slot_pool_segmented
65536 196.05 ns (âž– 1.01x slower)
262144 671.43 ns (âž– 1.01x faster)

sandboxes

create_initialized_and_drop
medium 14.26 ms (âž– 1.02x slower)

slot_pool

alloc_dealloc_4096 alloc_dealloc_1500 alloc_dealloc_128
8.73 ns (âž– 1.00x slower) 8.79 ns (âž– 1.01x slower) 8.73 ns (âž– 1.00x slower)

snapshot_files

load_snapshot_unverified
small 471.19 µs (➖ 1.24x faster)

virtq_readonly

slot_pool_segmented slot_pool_segmented_fragmented
65536 2.56 µs (➖ 1.01x slower) 2.58 µs (➖ 1.02x slower)
262144 8.87 µs (➖ 1.02x slower) 8.79 µs (➖ 1.00x slower)

virtq_readwrite

slot_pool_segmented slot_pool_segmented_fragmented
65536 9.37 µs (➖ 1.03x faster) 9.38 µs (➖ 1.01x slower)
262144 35.20 µs (➖ 1.01x faster)
8192 1.09 µs (➖ 1.02x faster) 1.10 µs (➖ 1.03x slower)

Reported by cargo ci bench-report --candidate run:45670302691 --config-file bench_report.toml.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-enhancement For PRs adding features, improving functionality, docs, tests, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant