generated from rust-vmm/crate-template
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disable EPOLLOUT if triggered while txbuf is empty
Currently the vsock connection always triggers on EPOLLOUT. When a host applicationlistens to the UDS, it's almost always writable, and thus keeps triggering backend events with EPOLLOUT on the connection. As a result, vhost-device-vsock daemon consumes 100% CPU. To make it more CPU efficient, it can instead unsubscribe EPOLLOUT whenever there is no more data to send. It can re-subscribe if the connection cannot write out all bytes. This change causes the CPU util to drop to negligible level. Signed-off-by: Leon Yang <[email protected]>
- Loading branch information
Showing
3 changed files
with
21 additions
and
3 deletions.
There are no files selected for viewing
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
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
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