Quoting Prabhakaran, Krishna (2026-11-12 07:29:14) > > No bug opened for issue, no exact hardware config described, no dmesg > > logs. > > > > Also, if you import a new dma-buf too frequently, probably shouldn't > > do that. > > This feedback was on v2, but it still applies to v4. The setup is an ARL-S > host running multiple VMs, with all VM's playing video. A persistent audio > glitch was heard during the playback. Here's a perf call tree captured from > the host QEMU process during video playback indicating that this was starving > the QEMU processing thread. > > virtio_gpu_resource_flush 45.45% > i915_gem_execbuffer2_ioctl > i915_gem_do_execbuffer > eb_validate_vmas > i915_vma_pin_ww > i915_vma_get_pages
This is already a point where you have fallen off the hot path and you should really look into your application code or virtio gpu code to optimize it to stay on the hot path (try_qad_pin succeeds). You should not be importing a new DMA-BUF per frame, but should instead keep recycling existing ones. If you keep using new buffers, you will be finding more and more hot spots in the code as a fresh BO (DMA-BUF or not) each frame is going to take a hit on the performance no matter what. It's not how you're supposed to write applications. > i915_gem_object_get_pages_dmabuf 36.65% > wbinvd_on_all_cpus 35.95% > on_each_cpu_cond_mask > smp_call_function_many_cond 35.92% (29.74% self) > __wbinvd 7.38% (self) > > This profiling data is what motivated the patch. This profiling data is not that interesting in itself because it's for a very suboptimal usage scenario of the uAPI. How do the numbers look like after the patch applied? It's the relative improvement of i915_gem_object_get_pages_dmabuf() that is of interest between baseline and this patch applied. Regards, Joonas
