Skip to content

Conversation

serban300
Copy link
Contributor

Reason for This PR

[block] simplify unsafe flush behavior

Description of Changes

Leverage the VIRTIO_BLK_F_FLUSH flag in order to avoid receiving flush
requests when the block device uses CacheType::Unsafe. This has 2
advantages:

  1. It simplifies the request execution logic a bit
  2. It improves efficiency when the block device uses CacheType::Unsafe
  • This functionality can be added in rust-vmm.

License Acceptance

By submitting this pull request, I confirm that my contribution is made under
the terms of the Apache 2.0 license.

PR Checklist

[Author TODO: Meet these criteria.]
[Reviewer TODO: Verify that these criteria are met. Request changes if not]

  • All commits in this PR are signed (git commit -s).
  • The reason for this PR is clearly provided (issue no. or explanation).
  • The description of changes is clear and encompassing.
  • Any required documentation changes (code and docs) are included in this PR.
  • Any newly added unsafe code is properly documented.
  • Any API changes are reflected in firecracker/swagger.yaml.
  • Any user-facing changes are mentioned in CHANGELOG.md.
  • All added/changed functionality is tested.

@serban300 serban300 added the Status: Awaiting review Indicates that a pull request is ready to be reviewed label Aug 20, 2021
@serban300 serban300 self-assigned this Aug 20, 2021
Copy link
Contributor

@georgepisaltu georgepisaltu left a comment

Choose a reason for hiding this comment

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

Do we have some measurement for the improvement in performance? I expect this change to speed things up as there would normally be no flush requests to process, but I was wondering if we have some numbers.

@serban300
Copy link
Contributor Author

Do we have some measurement for the improvement in performance? I expect this change to speed things up as there would normally be no flush requests to process, but I was wondering if we have some numbers.

I did some manual tests and we get an improvement of roughly 2-3%

dianpopa
dianpopa previously approved these changes Aug 23, 2021
georgepisaltu
georgepisaltu previously approved these changes Aug 23, 2021
@serban300 serban300 dismissed stale reviews from georgepisaltu and dianpopa via b594443 August 23, 2021 13:55
Leverage the VIRTIO_BLK_F_FLUSH flag in order to avoid receiving flush
requests when the block device uses CacheType::Unsafe. This has 2
advantages:
1. It simplifies the request execution logic a bit
2. It improves efficiency when the block device uses CacheType::Unsafe

Signed-off-by: Serban Iorga <seriorga@amazon.com>
@dianpopa dianpopa merged commit 794e7f4 into firecracker-microvm:main Aug 23, 2021
@kalyazin kalyazin mentioned this pull request Oct 17, 2023
9 tasks
ShadowCurse added a commit to ShadowCurse/firecracker that referenced this pull request Oct 18, 2023
In firecracker-microvm#2702 the behaviour of the `Unsafe` cache type
was changed. If selected the `flush` feature is
not advertised to the guest. This commit just
adds missing documentation change.

Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
ShadowCurse added a commit to ShadowCurse/firecracker that referenced this pull request Oct 18, 2023
In firecracker-microvm#2702 the behaviour of the `Unsafe` cache type
was changed. If selected the `flush` feature is
not advertised to the guest. This commit just
adds missing documentation change.

Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
ShadowCurse added a commit to ShadowCurse/firecracker that referenced this pull request Oct 18, 2023
In firecracker-microvm#2702 the behaviour of the `Unsafe` cache type
was changed. If selected the `flush` feature is
not advertised to the guest. This commit just
adds missing documentation change.

Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
ShadowCurse added a commit to ShadowCurse/firecracker that referenced this pull request Oct 19, 2023
In firecracker-microvm#2702 the behaviour of the `Unsafe` cache type
was changed. If selected the `flush` feature is
not advertised to the guest. This commit just
adds missing documentation change.

Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
ShadowCurse added a commit to ShadowCurse/firecracker that referenced this pull request Oct 19, 2023
In firecracker-microvm#2702 the behaviour of the `Unsafe` cache type
was changed. If selected the `flush` feature is
not advertised to the guest. This commit just
adds missing documentation change.

Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
ShadowCurse added a commit to ShadowCurse/firecracker that referenced this pull request Oct 19, 2023
In firecracker-microvm#2702 the behaviour of the `Unsafe` cache type
was changed. If selected the `flush` feature is
not advertised to the guest. This commit just
adds missing documentation change.

Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
ShadowCurse added a commit to ShadowCurse/firecracker that referenced this pull request Oct 20, 2023
In firecracker-microvm#2702 the behaviour of the `Unsafe` cache type
was changed. If selected the `flush` feature is
not advertised to the guest. This commit just
adds missing documentation change.

Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
ShadowCurse added a commit to ShadowCurse/firecracker that referenced this pull request Oct 20, 2023
In firecracker-microvm#2702 the behaviour of the `Unsafe` cache type
was changed. If selected the `flush` feature is
not advertised to the guest. This commit just
adds missing documentation change.

Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
ShadowCurse added a commit to ShadowCurse/firecracker that referenced this pull request Oct 20, 2023
In firecracker-microvm#2702 the behaviour of the `Unsafe` cache type
was changed. If selected the `flush` feature is
not advertised to the guest. This commit just
adds missing documentation change.

Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
ShadowCurse added a commit to ShadowCurse/firecracker that referenced this pull request Oct 20, 2023
In firecracker-microvm#2702 the behaviour of the `Unsafe` cache type
was changed. If selected the `flush` feature is
not advertised to the guest. This commit just
adds missing documentation change.

Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
ShadowCurse added a commit to ShadowCurse/firecracker that referenced this pull request Oct 20, 2023
In firecracker-microvm#2702 the behaviour of the `Unsafe` cache type
was changed. If selected the `flush` feature is
not advertised to the guest. This commit just
adds missing documentation change.

Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
ShadowCurse added a commit to ShadowCurse/firecracker that referenced this pull request Oct 21, 2023
In firecracker-microvm#2702 the behaviour of the `Unsafe` cache type
was changed. If selected the `flush` feature is
not advertised to the guest. This commit just
adds missing documentation change.

Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
ShadowCurse added a commit to ShadowCurse/firecracker that referenced this pull request Oct 23, 2023
In firecracker-microvm#2702 the behaviour of the `Unsafe` cache type
was changed. If selected the `flush` feature is
not advertised to the guest. This commit just
adds missing documentation change.

Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
ShadowCurse added a commit to ShadowCurse/firecracker that referenced this pull request Oct 23, 2023
In firecracker-microvm#2702 the behaviour of the `Unsafe` cache type
was changed. If selected the `flush` feature is
not advertised to the guest. This commit just
adds missing documentation change.

Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
ShadowCurse added a commit to ShadowCurse/firecracker that referenced this pull request Oct 23, 2023
In firecracker-microvm#2702 the behaviour of the `Unsafe` cache type
was changed. If selected the `flush` feature is
not advertised to the guest. This commit just
adds missing documentation change.

Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
ShadowCurse added a commit to ShadowCurse/firecracker that referenced this pull request Oct 25, 2023
In firecracker-microvm#2702 the behaviour of the `Unsafe` cache type
was changed. If selected the `flush` feature is
not advertised to the guest. This commit just
adds missing documentation change.

Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
ShadowCurse added a commit to ShadowCurse/firecracker that referenced this pull request Oct 25, 2023
In firecracker-microvm#2702 the behaviour of the `Unsafe` cache type
was changed. If selected the `flush` feature is
not advertised to the guest. This commit just
adds missing documentation change.

Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
ShadowCurse added a commit to ShadowCurse/firecracker that referenced this pull request Oct 28, 2023
In firecracker-microvm#2702 the behaviour of the `Unsafe` cache type
was changed. If selected the `flush` feature is
not advertised to the guest. This commit just
adds missing documentation change.

Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
ShadowCurse added a commit to ShadowCurse/firecracker that referenced this pull request Oct 28, 2023
In firecracker-microvm#2702 the behaviour of the `Unsafe` cache type
was changed. If selected the `flush` feature is
not advertised to the guest. This commit just
adds missing documentation change.

Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
ShadowCurse added a commit to ShadowCurse/firecracker that referenced this pull request Oct 28, 2023
In firecracker-microvm#2702 the behaviour of the `Unsafe` cache type
was changed. If selected the `flush` feature is
not advertised to the guest. This commit just
adds missing documentation change.

Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
ShadowCurse added a commit to ShadowCurse/firecracker that referenced this pull request Oct 30, 2023
In firecracker-microvm#2702 the behaviour of the `Unsafe` cache type
was changed. If selected the `flush` feature is
not advertised to the guest. This commit just
adds missing documentation change.

Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
ShadowCurse added a commit to ShadowCurse/firecracker that referenced this pull request Oct 30, 2023
In firecracker-microvm#2702 the behaviour of the `Unsafe` cache type
was changed. If selected the `flush` feature is
not advertised to the guest. This commit just
adds missing documentation change.

Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
ShadowCurse added a commit to ShadowCurse/firecracker that referenced this pull request Oct 30, 2023
In firecracker-microvm#2702 the behaviour of the `Unsafe` cache type
was changed. If selected the `flush` feature is
not advertised to the guest. This commit just
adds missing documentation change.

Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
ShadowCurse added a commit to ShadowCurse/firecracker that referenced this pull request Oct 30, 2023
In firecracker-microvm#2702 the behaviour of the `Unsafe` cache type
was changed. If selected the `flush` feature is
not advertised to the guest. This commit just
adds missing documentation change.

Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
ShadowCurse added a commit to ShadowCurse/firecracker that referenced this pull request Oct 30, 2023
In firecracker-microvm#2702 the behaviour of the `Unsafe` cache type
was changed. If selected the `flush` feature is
not advertised to the guest. This commit just
adds missing documentation change.

Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
ShadowCurse added a commit to ShadowCurse/firecracker that referenced this pull request Oct 30, 2023
In firecracker-microvm#2702 the behaviour of the `Unsafe` cache type
was changed. If selected the `flush` feature is
not advertised to the guest. This commit just
adds missing documentation change.

Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
ShadowCurse added a commit to ShadowCurse/firecracker that referenced this pull request Oct 31, 2023
In firecracker-microvm#2702 the behaviour of the `Unsafe` cache type
was changed. If selected the `flush` feature is
not advertised to the guest. This commit just
adds missing documentation change.

Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
ShadowCurse added a commit to ShadowCurse/firecracker that referenced this pull request Oct 31, 2023
In firecracker-microvm#2702 the behaviour of the `Unsafe` cache type
was changed. If selected the `flush` feature is
not advertised to the guest. This commit just
adds missing documentation change.

Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
ShadowCurse added a commit to ShadowCurse/firecracker that referenced this pull request Nov 1, 2023
In firecracker-microvm#2702 the behaviour of the `Unsafe` cache type
was changed. If selected the `flush` feature is
not advertised to the guest. This commit just
adds missing documentation change.

Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
ShadowCurse added a commit to ShadowCurse/firecracker that referenced this pull request Nov 1, 2023
In firecracker-microvm#2702 the behaviour of the `Unsafe` cache type
was changed. If selected the `flush` feature is
not advertised to the guest. This commit just
adds missing documentation change.

Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
ShadowCurse added a commit to ShadowCurse/firecracker that referenced this pull request Nov 1, 2023
In firecracker-microvm#2702 the behaviour of the `Unsafe` cache type
was changed. If selected the `flush` feature is
not advertised to the guest. This commit just
adds missing documentation change.

Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
ShadowCurse added a commit to ShadowCurse/firecracker that referenced this pull request Nov 6, 2023
In firecracker-microvm#2702 the behaviour of the `Unsafe` cache type
was changed. If selected the `flush` feature is
not advertised to the guest. This commit just
adds missing documentation change.

Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
ShadowCurse added a commit to ShadowCurse/firecracker that referenced this pull request Nov 7, 2023
In firecracker-microvm#2702 the behaviour of the `Unsafe` cache type
was changed. If selected the `flush` feature is
not advertised to the guest. This commit just
adds missing documentation change.

Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
ShadowCurse added a commit to ShadowCurse/firecracker that referenced this pull request Nov 7, 2023
In firecracker-microvm#2702 the behaviour of the `Unsafe` cache type
was changed. If selected the `flush` feature is
not advertised to the guest. This commit just
adds missing documentation change.

Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
ShadowCurse added a commit to ShadowCurse/firecracker that referenced this pull request Nov 7, 2023
In firecracker-microvm#2702 the behaviour of the `Unsafe` cache type
was changed. If selected the `flush` feature is
not advertised to the guest. This commit just
adds missing documentation change.

Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
ShadowCurse added a commit to ShadowCurse/firecracker that referenced this pull request Nov 7, 2023
In firecracker-microvm#2702 the behaviour of the `Unsafe` cache type
was changed. If selected the `flush` feature is
not advertised to the guest. This commit just
adds missing documentation change.

Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
ShadowCurse added a commit that referenced this pull request Nov 8, 2023
In #2702 the behaviour of the `Unsafe` cache type
was changed. If selected the `flush` feature is
not advertised to the guest. This commit just
adds missing documentation change.

Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Awaiting review Indicates that a pull request is ready to be reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants