Skip to content

Conversation

@elainewu1222
Copy link

Currently, when finishing processing disk IO completion event, virtio-blk calls process_queue_submit_and_signal if rate limit not reached. That's because to support notification suppression, the backend needs to work in a loop and process all available event in the queue until nothing remained.
However, for case that rate_limit_reached == true, the backend stop handling without sending frontend a signal. Though when rate limit refills, the backend will be able to send the signal when handling RATE_LIMITER_EVENT, the signal is actually delayed for some time.
This fix will make the backend able to send the signal immediately no matter rate limit is hit or not.

@elainewu1222 elainewu1222 requested a review from a team as a code owner August 19, 2024 06:46
@elainewu1222 elainewu1222 force-pushed the fix-virt-blk-notification branch 2 times, most recently from 6d13850 to d9ae1ae Compare August 19, 2024 09:17
When the rate limit was reached it was possible for the notification to
the guest to be lost since the logic to handle the notification was
tightly coupled with processing the queue. The notification would
eventually be triggered when the rate limit pool was refilled but this
could add significant latency.

Address this by refactoring the code to separate processing queue and
signalling - the processing of the queue is suspended when the rate
limit is reached but the signalling will still be attempted if needed
(i.e. VIRTIO_F_EVENT_IDX is still considered.)

Signed-off-by: wuxinyue <[email protected]>
Signed-off-by: Rob Bradford <[email protected]>
@rbradford rbradford force-pushed the fix-virt-blk-notification branch from d9ae1ae to ea96bac Compare August 23, 2024 16:23
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.

I made a change to your commit message (no code change) to reflect what was written in the PR body and to match the project style. Hopefully this works for you?

@elainewu1222
Copy link
Author

@rbradford yes, quite clear. thx.

@rbradford rbradford added this pull request to the merge queue Aug 31, 2024
@rbradford rbradford added the bug-fix Bug fix to include in release notes label Aug 31, 2024
Merged via the queue into cloud-hypervisor:main with commit 6956306 Aug 31, 2024
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.

3 participants