> 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
            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.

> You're literally echoing what code does or has in comments here. We
> can see the code by looking at the code.
>
> Please try to use less LLMs and use more of your own words for
> describing the changes or writing comments.
>
> Patch description could literally have been around two sentences
> about reducing the amount of unnecessary flushing.

Fair point. I'll keep the v5 changelog focused on the problem being addressed 
and the proposed fix, rather than restating what is already apparent from the 
code.

> Definitely no Fixes tag for what is essentially an optimization.

Agreed. I'll drop the Fixes tag.

I will post v5.

Krishna

Reply via email to