commit | 467430613a3de1931e43c1e48f7a18689f1c3dc1 | [log] [tgz] |
---|---|---|
author | Zyta Szpak <zyta@google.com> | Tue Apr 26 10:25:05 2022 +0000 |
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | Wed May 11 08:05:32 2022 +0000 |
tree | ba1c33f087b20907655b4616f8d88a3baf7f1dff | |
parent | a4cb63d7ce4a3fa8789bb782422a3d3f701a7167 [diff] |
virtio: video: Increase command queue size The queue size defines the number of available descriptors, that can be used for exchanging messages between guest and hypervisor. Each virtio-video command uses at least 1 descriptor (eg. CMD_QUEUE uses 2). The amount of descriptors in use depends on the number of sessions and buffers in input and output video queue. In the worst case scenario the peak number can reach over 672 for 8 simultaneous streams, with 26 + 16 buffers each just for CMD_QUEUE commands alone. If the entire queue is overfilled with CMD_QUEUE for OUTPUT queue only, the driver has no free descriptors for INPUT queue buffers. This leads to encoder/decoder starvation, hence no OUTPUT buffer can be produced and no CMD_QUEUE will finish, which leads to dead locking the device. This patch increases the queue size with consideration of above details with some headroom to avoid driver's deadlock. BUG=b:204055006 TEST=App from https://github.com/chromeos/video-decode-encode-demo.git with 8 simultaneous stream runs without blocking the device. Change-Id: If51e340dd501b5b261518fba23fc541e3b55af8a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3606869 Reviewed-by: Dmitry Torokhov <dtor@chromium.org> Reviewed-by: Emilie Roberts <hadrosaur@google.com> Reviewed-by: Chih-Yu Huang <akahuang@chromium.org> Commit-Queue: Marcin Wojtas <mwojtas@google.com> Tested-by: kokoro <noreply+kokoro@google.com>
crosvm is a virtual machine monitor (VMM) based on Linux’s KVM hypervisor, with a focus on simplicity, security, and speed. crosvm is intended to run Linux guests, originally as a security boundary for running native applications on the Chrome OS platform. Compared to QEMU, crosvm doesn’t emulate architectures or real hardware, instead concentrating on paravirtualized devices, such as the virtio standard.
crosvm is currently used to run Linux/Android guests on Chrome OS devices.