Skip to content
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

block: fix aio backend behavior when writeback cache disabled #5930

Merged
merged 1 commit into from
Nov 9, 2023

Conversation

thomasbarrett
Copy link
Contributor

@thomasbarrett thomasbarrett commented Nov 8, 2023

If writeback cache is disabled, cloud-hypervisor performs a flush after each write. The newly added aio backend does not handle this case properly. Under these conditions, io_uring backend performs a synchronous flush. This PR updates the aio backend to have the same behavior. A modern guest will support writeback cache mode for performance (which is likely why this wasn't caught by manual testing or integration tests).

@thomasbarrett thomasbarrett requested a review from a team as a code owner November 8, 2023 17:03
@thomasbarrett thomasbarrett changed the title Fix aio backend behavior when writeback enabled Fix aio backend behavior when writeback disabled Nov 8, 2023
@thomasbarrett thomasbarrett changed the title Fix aio backend behavior when writeback disabled Fix aio backend behavior when writeback cache disabled Nov 8, 2023
@thomasbarrett
Copy link
Contributor Author

Looks like some dependencies don't build on nightly @likebreath :(

@rbradford
Copy link
Member

Looks like some dependencies don't build on nightly @likebreath :(

This is a known problem - a regression in the nightly compiler.

Copy link
Member

@rbradford rbradford left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you fix the commit message? (missing a "block" tag)

Signed-off-by: Thomas Barrett <tbarrett@crusoeenergy.com>
@thomasbarrett thomasbarrett changed the title Fix aio backend behavior when writeback cache disabled block: fix aio backend behavior when writeback cache disabled Nov 8, 2023
@likebreath likebreath merged commit d9ed281 into cloud-hypervisor:main Nov 9, 2023
19 of 22 checks passed
@likebreath likebreath added the bug-fix Bug fix to include in release notes label Nov 27, 2023
russell-islam pushed a commit to microsoft/cloud-hypervisor that referenced this pull request Apr 12, 2024
v37.0

This release has been tracked in our [roadmap
project](https://github.com/orgs/cloud-hypervisor/projects/6) as iteration
v37.0. The following user visible changes have been made:

Long Term Support (LTS) Release
-------------------------------

This release is a LTS release. Point releases for bug fixes will be made
for the next 18 months; live migration and live upgrade will be
supported between the point releases of the LTS.

Multiple PCI segments Support for 32-bit VFIO devices
-----------------------------------------------------

Now VFIO devices with 32-bit memory BARs can be attached to non-zero PCI
segments on the guest, allowing users to have more 32-bit devices and
assign such devices to appropriate NUMA nodes for better performance.

Configurable Named TAP Devices
------------------------------

Named TAP devices now accepts IP configuration from users, such as IP
and MAC address, as long as the named TAP device is created by Cloud
Hypervisor (e.g. not existing TAP devices).

TTY Output from Both Serial Device and Virtio Console
-----------------------------------------------------

Now legacy serial device and virtio console can be set as TTY mode as
the same time. This allows users to capture early boot logs with the
legacy serial device without losing performance benefits of using
virtio-console, when appropriate kernel configuration is used (such as
using kernel command-line `console=hvc0 earlyprintk=ttyS0` on x86).

Faster VM Restoration from Snapshots
------------------------------------

The speed of VM restoration from snapshots is improved with a better
implementation of deserializing JSON files.

Notable Bug Fixes
-----------------

* Fix aio backend behavior for block devices when writeback cache
  disabled (cloud-hypervisor#5930)
* Fix PvPanic device PCI BAR alignment (cloud-hypervisor#5956)
* Bug fix to OpenAPI specification file (cloud-hypervisor#5967)
* Error out early for live migration when TDX is enabled (cloud-hypervisor#6025)

Contributors
------------

Many thanks to everyone who has contributed to our release:

* Bo Chen <chen.bo@intel.com>
* Jinank Jain <jinankjain@microsoft.com>
* Markus Sütter <markus.suetter@secunet.com>
* Michael Zhao <michael.zhao@arm.com>
* Muminul Islam <muislam@microsoft.com>
* Rob Bradford <rbradford@rivosinc.com>
* Rui Chang <rui.chang@arm.com>
* Ruslan Mstoi <ruslan.mstoi@intel.com>
* Thomas Barrett <tbarrett@crusoeenergy.com>
* Wei Liu <liuwe@microsoft.com>
* Yi Wang <foxywang@tencent.com>
* Yong He <alexyonghe@tencent.com>

* tag 'v37.0': (540 commits)
  build: Release v37.0
  tests: Stabilize 'test_vfio_user' with retries to run host commands
  arch: x86_64: Refactor the way to generate e820 RAM maps
  build: Bump async-executor from 1.5.1 to 1.8.0
  build: Bump once_cell from 1.18.0 to 1.19.0 in /fuzz
  build: Bump mshv-ioctls from `6901f9c` to `0dd4d34`
  build: Bump anstyle-query from 1.0.0 to 1.0.2 in /fuzz
  vmm: tdx: Error out early for TD migration
  vmm: Fix a typo from send_migration()
  hypervisor: fix few typos and cosmetic issues
  build: Bump pin-project from 1.1.2 to 1.1.3
  build: Bump ryu from 1.0.15 to 1.0.16 in /fuzz
  docs: Add a missing backslash
  vmm: igvm: Remove redundant copy_from_slice
  github: ci: Move to action/checkout v4
  hypervisor: vmm: Fix warnings in Cargo.toml
  build: Bump futures-core from 0.3.28 to 0.3.29
  build: Bump anstream from 0.6.4 to 0.6.5 in /fuzz
  vmm: Pass IGVM file to the loader
  vmm: Add igvm module and loader module
  ...
russell-islam pushed a commit to microsoft/cloud-hypervisor that referenced this pull request Apr 12, 2024
v37.0

This release has been tracked in our [roadmap
project](https://github.com/orgs/cloud-hypervisor/projects/6) as iteration
v37.0. The following user visible changes have been made:

Long Term Support (LTS) Release
-------------------------------

This release is a LTS release. Point releases for bug fixes will be made
for the next 18 months; live migration and live upgrade will be
supported between the point releases of the LTS.

Multiple PCI segments Support for 32-bit VFIO devices
-----------------------------------------------------

Now VFIO devices with 32-bit memory BARs can be attached to non-zero PCI
segments on the guest, allowing users to have more 32-bit devices and
assign such devices to appropriate NUMA nodes for better performance.

Configurable Named TAP Devices
------------------------------

Named TAP devices now accepts IP configuration from users, such as IP
and MAC address, as long as the named TAP device is created by Cloud
Hypervisor (e.g. not existing TAP devices).

TTY Output from Both Serial Device and Virtio Console
-----------------------------------------------------

Now legacy serial device and virtio console can be set as TTY mode as
the same time. This allows users to capture early boot logs with the
legacy serial device without losing performance benefits of using
virtio-console, when appropriate kernel configuration is used (such as
using kernel command-line `console=hvc0 earlyprintk=ttyS0` on x86).

Faster VM Restoration from Snapshots
------------------------------------

The speed of VM restoration from snapshots is improved with a better
implementation of deserializing JSON files.

Notable Bug Fixes
-----------------

* Fix aio backend behavior for block devices when writeback cache
  disabled (cloud-hypervisor#5930)
* Fix PvPanic device PCI BAR alignment (cloud-hypervisor#5956)
* Bug fix to OpenAPI specification file (cloud-hypervisor#5967)
* Error out early for live migration when TDX is enabled (cloud-hypervisor#6025)

Contributors
------------

Many thanks to everyone who has contributed to our release:

* Bo Chen <chen.bo@intel.com>
* Jinank Jain <jinankjain@microsoft.com>
* Markus Sütter <markus.suetter@secunet.com>
* Michael Zhao <michael.zhao@arm.com>
* Muminul Islam <muislam@microsoft.com>
* Rob Bradford <rbradford@rivosinc.com>
* Rui Chang <rui.chang@arm.com>
* Ruslan Mstoi <ruslan.mstoi@intel.com>
* Thomas Barrett <tbarrett@crusoeenergy.com>
* Wei Liu <liuwe@microsoft.com>
* Yi Wang <foxywang@tencent.com>
* Yong He <alexyonghe@tencent.com>

* tag 'v37.0': (540 commits)
  build: Release v37.0
  tests: Stabilize 'test_vfio_user' with retries to run host commands
  arch: x86_64: Refactor the way to generate e820 RAM maps
  build: Bump async-executor from 1.5.1 to 1.8.0
  build: Bump once_cell from 1.18.0 to 1.19.0 in /fuzz
  build: Bump mshv-ioctls from `6901f9c` to `0dd4d34`
  build: Bump anstyle-query from 1.0.0 to 1.0.2 in /fuzz
  vmm: tdx: Error out early for TD migration
  vmm: Fix a typo from send_migration()
  hypervisor: fix few typos and cosmetic issues
  build: Bump pin-project from 1.1.2 to 1.1.3
  build: Bump ryu from 1.0.15 to 1.0.16 in /fuzz
  docs: Add a missing backslash
  vmm: igvm: Remove redundant copy_from_slice
  github: ci: Move to action/checkout v4
  hypervisor: vmm: Fix warnings in Cargo.toml
  build: Bump futures-core from 0.3.28 to 0.3.29
  build: Bump anstream from 0.6.4 to 0.6.5 in /fuzz
  vmm: Pass IGVM file to the loader
  vmm: Add igvm module and loader module
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-fix Bug fix to include in release notes
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants