|
From: | Manos Pitsidianakis |
Subject: | Re: [PATCH v8 03/12] virtio-sound: handle control messages and streams |
Date: | Mon, 04 Sep 2023 13:18:42 +0300 |
User-agent: | meli 0.8.0 |
Good morning Philippe, On Mon, 04 Sep 2023 13:08, Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
+ iov_from_buf(cmd->elem->in_sg, + cmd->elem->in_num, + 0, + &cmd->resp, + sizeof(cmd->resp)); + virtqueue_push(cmd->vq, cmd->elem, sizeof(cmd->elem)); + virtio_notify(VIRTIO_DEVICE(s), cmd->vq);I have very few understanding of virtio, but I'm wondering here, since this function is called under cmdq_mutex(), could it be useful to batch the queue by calling virtio_notify() only once in the caller once the whole cmdq is processed ...
In the linux driver (sound/virtio/virtio_ctl_msg.c), the guest has a timeout for receiving the message. I found that if I did not notify as fast as possible, I got timeout errors on the guest.
[Prev in Thread] | Current Thread | [Next in Thread] |