Skip to content

[blk-threaded - 1/12] block: separate configuration from runtime resources - #6123

Open
PierreBertholom wants to merge 1 commit into
feature/virtio-blk-threadedfrom
pbertho/blk-threaded-01
Open

[blk-threaded - 1/12] block: separate configuration from runtime resources#6123
PierreBertholom wants to merge 1 commit into
feature/virtio-blk-threadedfrom
pbertho/blk-threaded-01

Conversation

@PierreBertholom

@PierreBertholom PierreBertholom commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Stack

This pull request starts a 12-part stack and builds on #6053.

The stack adds an optional dedicated worker thread for each virtio-block device.
When threaded mode is enabled, the worker owns the data-path resources and processes I/O outside the VMM thread.
This design lets block I/O run in parallel with other VMM work and reduces contention on the VMM thread.
When threaded mode is disabled, the device keeps the current inline behavior and processes I/O on the VMM thread.

The stack adds the full worker lifecycle, runtime updates, snapshot support, seccomp policy, API configuration, and test coverage.

Changes

Keep block configuration in VirtioBlockConfig and remove duplicated fields.
Move queues, eventfds, disk, and rate-limiter state to BlockResources.
Keep configuration synchronized across runtime updates and snapshot restore.

This prepares runtime resources to move to a worker thread.

Keep block configuration in VirtioBlockConfig and remove duplicated
fields.
Move queues, eventfds, disk, and rate-limiter state to BlockResources.
Keep configuration synchronized across runtime updates and snapshot
restore.

This prepares runtime resources to move to a worker thread.

Signed-off-by: Pierre Bertholom <pbertho@amazon.com>
@codecov

codecov Bot commented Aug 18, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 87.15596% with 14 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.61%. Comparing base (75f6f72) to head (836a94d).

Files with missing lines Patch % Lines
src/vmm/src/devices/virtio/block/virtio/device.rs 83.78% 12 Missing ⚠️
...m/src/devices/virtio/block/virtio/event_handler.rs 60.00% 2 Missing ⚠️
Additional details and impacted files
@@                       Coverage Diff                       @@
##           feature/virtio-blk-threaded    #6123      +/-   ##
===============================================================
+ Coverage                        82.60%   82.61%   +0.01%     
===============================================================
  Files                              277      277              
  Lines                            30942    30966      +24     
===============================================================
+ Hits                             25559    25583      +24     
  Misses                            5383     5383              
Flag Coverage Δ
5.10-m5n.metal 82.82% <87.15%> (+<0.01%) ⬆️
5.10-m6a.metal 82.18% <87.15%> (+0.01%) ⬆️
5.10-m6g.metal 79.64% <87.15%> (+0.01%) ⬆️
5.10-m6i.metal 82.83% <87.15%> (+0.01%) ⬆️
5.10-m7a.metal-48xl 82.17% <87.15%> (+0.01%) ⬆️
5.10-m7g.metal 79.64% <87.15%> (+0.01%) ⬆️
5.10-m7i.metal-24xl 82.80% <87.15%> (+0.01%) ⬆️
5.10-m7i.metal-48xl 82.80% <87.15%> (+0.01%) ⬆️
5.10-m8g.metal-24xl 79.64% <87.15%> (+0.01%) ⬆️
5.10-m8g.metal-48xl 79.64% <87.15%> (+0.01%) ⬆️
5.10-m8i.metal-48xl 82.80% <87.15%> (+0.01%) ⬆️
5.10-m8i.metal-96xl 82.81% <87.15%> (+0.01%) ⬆️
6.1-m5n.metal 82.85% <87.15%> (+0.01%) ⬆️
6.1-m6a.metal 82.21% <87.15%> (+0.02%) ⬆️
6.1-m6g.metal 79.64% <87.15%> (+0.02%) ⬆️
6.1-m6i.metal 82.85% <87.15%> (+0.01%) ⬆️
6.1-m7a.metal-48xl 82.19% <87.15%> (+0.01%) ⬆️
6.1-m7g.metal 79.64% <87.15%> (+0.01%) ⬆️
6.1-m7i.metal-24xl 82.87% <87.15%> (+0.01%) ⬆️
6.1-m7i.metal-48xl 82.87% <87.15%> (+0.01%) ⬆️
6.1-m8g.metal-24xl 79.64% <87.15%> (+0.01%) ⬆️
6.1-m8g.metal-48xl 79.64% <87.15%> (+0.01%) ⬆️
6.1-m8i.metal-48xl 82.86% <87.15%> (+0.01%) ⬆️
6.1-m8i.metal-96xl 82.87% <87.15%> (+0.01%) ⬆️
6.18-m5n.metal 82.85% <87.15%> (+<0.01%) ⬆️
6.18-m6a.metal 82.20% <87.15%> (+0.01%) ⬆️
6.18-m6g.metal 79.64% <87.15%> (+0.02%) ⬆️
6.18-m6i.metal 82.85% <87.15%> (+0.01%) ⬆️
6.18-m7a.metal-48xl 82.19% <87.15%> (+0.01%) ⬆️
6.18-m7g.metal 79.64% <87.15%> (+0.01%) ⬆️
6.18-m7i.metal-24xl 82.86% <87.15%> (+0.01%) ⬆️
6.18-m7i.metal-48xl 82.86% <87.15%> (+<0.01%) ⬆️
6.18-m8g.metal-24xl 79.64% <87.15%> (+0.01%) ⬆️
6.18-m8g.metal-48xl 79.64% <87.15%> (+0.01%) ⬆️
6.18-m8i.metal-48xl 82.86% <87.15%> (+0.01%) ⬆️
6.18-m8i.metal-96xl 82.87% <87.15%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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