-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VirtIO optimizations #177
Merged
Merged
VirtIO optimizations #177
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Import event_idx functionality from rust-vmm's virtio-queue. This feature allows us to reduce the number of signals sent between the guest and the host. Signed-off-by: Sergio Lopez <slp@redhat.com>
2dfef38
to
3fdc93b
Compare
Move the work to a separate thread. This reduces the operation latency, minimizes the noise between devices and allows us to implement more aggressive optimization strategies. While there, also adopt the EVENT_IDX to reduce the notification traffic between the guest and the host. Signed-off-by: Sergio Lopez <slp@redhat.com>
Increase SNDBUF and RCVBUF to the maximum allowed by default on macOS. Signed-off-by: Sergio Lopez <slp@redhat.com>
Increase queue size to 1024. This minimizes the chances of dropping incoming packets. Signed-off-by: Sergio Lopez <slp@redhat.com>
virtio-block can support large segment numbers (visible in Linux as "max_segments") by putting more than one data descriptor in the descriptor chain. So far, we only supported a single data descriptor, which on Linux implies "max_segments == 1". In this commit we reuse the Reader/Writer abstractions that have been used by virtio/fs for very long to be able to easily digest large descriptor chains, and we extend VirtioBlkConfig to declare that we support up to 254 (QUEUE_SIZE - 2) segments. This provides a huge performance boost for both reading and writing large chunks of data. While there, also implement support for EVENT_IDX to reduce the traffic of signals between the guest and the host. Signed-off-by: Sergio Lopez <slp@redhat.com>
Move the work to a separate thread. This reduces the operation latency, minimizes the noise between devices and allows us to implement more aggressive optimization strategies. Signed-off-by: Sergio Lopez <slp@redhat.com>
Move the work to a separate thread. This reduces the operation latency, minimizes the noise between devices and allows us to implement more aggressive optimization strategies. Signed-off-by: Sergio Lopez <slp@redhat.com>
Update binary built from tianocore/edk2@fc0b5a6 Signed-off-by: Sergio Lopez <slp@redhat.com>
This release includes optimizations on the main virtio devices (net, blk and fs). Signed-off-by: Sergio Lopez <slp@redhat.com>
3fdc93b
to
8e9fdac
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Originally, libkrun was designed to prioritize having a minimal footprint. With newer use cases, we need to find a balance between being small and lean and being performant. In this series, we move the heavy hitters (block, net and fs) to their own threads, which reduces the latency and prevents them from starving each other.
We also adopt EVENT_IDX to reduce the signal traffic between the guest and the host and update EDK2 to remove the boot wait, along other minor optimizations in virtio-net.