On Wed, Sep 13, 2023 at 06:58:30PM +0300, Manos Pitsidianakis wrote: > Hello Matias, > > Please show and refer to code snippets from the kernel tree that you > think are related to your question. It'd help us make sure we all talk > about the same thing. >
In this discussion, I am referring to the way in which the virtio-sound driver is manipulating buffers that have been consumed by the device, e.g., used-ring in the tx queue. My understanding is the driver builds a ring-buffer that is shared with the user application in the guest. As soon as the device returns a buffer to the used ring, the driver puts the request in the available ring again. This is my understanding from sound/virtio/virtio_pcm_msg.c#L324. The user application updates the content of the buffer at sound/virtio/virtio_pcm_msg.c#L322, but this task is deferred by using schedule_work(). The update of the buffer may happen once the buffers are already in the available ring. Thanks, Matias. _______________________________________________ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization