Skip to content

Revert readv optimization in virtio-net device #4839

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

Conversation

firecracker-automation
Copy link
Collaborator

The changes introduced in IoVecBufferMut that allowed implementing readv support for virtio-net regressed the performance of vsock device. This is because now, when we create IoVecBufferMut objects we do a bunch (1 memfd_create and 3 mmap) of system calls. virtio-net device avoids the performance issue because it creates a single IoVecBufferMut and re-uses it, whereas vsock is creating a new IoVecBufferMut object for every packet it receives.

We have a fix for this, which essentially creates a single IoVecBufferMut that reuses for all the incoming vsock packets during a connection. The problem with the fix is that it makes unit-tests really unhappy and we need a significant amount of work to fix them.

So, revert the PR to have main in a clean state. We will fix the vsock issues out-of-band and re-open the PR.

This reverts commits:

from PR #4799

Changes

...

Reason

...

License Acceptance

By submitting this pull request, I confirm that my contribution is made under
the terms of the Apache 2.0 license. For more information on following Developer
Certificate of Origin and signing off your commits, please check
CONTRIBUTING.md.

PR Checklist

  • If a specific issue led to this PR, this PR closes the issue.
  • The description of changes is clear and encompassing.
  • Any required documentation changes (code and docs) are included in this
    PR.
  • API changes follow the Runbook for Firecracker API changes.
  • User-facing changes are mentioned in CHANGELOG.md.
  • All added/changed functionality is tested.
  • New TODOs link to an issue.
  • Commits meet
    contribution quality standards.

  • This functionality cannot be added in rust-vmm.

The changes introduced in IoVecBufferMut that allowed implementing readv
support for virtio-net regressed the performance of vsock device. This
is because now, when we create IoVecBufferMut objects we do a bunch (1
memfd_create and 3 mmap) of system calls. virtio-net device avoids the
performance issue because it creates a single IoVecBufferMut and re-uses
it, whereas vsock is creating a new IoVecBufferMut object for every
packet it receives.

We have a fix for this, which essentially creates a single
IoVecBufferMut that reuses for all the incoming vsock packets during a
connection. The problem with the fix is that it makes unit-tests really
unhappy and we need a significant amount of work to fix them.

So, revert the PR to have main in a clean state. We will fix the vsock
issues out-of-band and re-open the PR.

This reverts commits:
- bc0ba43
- 667aba4
- 5d718d4
- 14e6e33
- 1e4c632

from PR firecracker-microvm#4799

Signed-off-by: Babis Chalios <bchalios@amazon.es>
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