[Libva] High CPU usage in __i915_wait_request when encoding video

Rogozhkin, Dmitry V dmitry.v.rogozhkin at intel.com
Thu Nov 12 00:26:37 PST 2015


We also met with the issue for our project which very much looks as what you are describing here.
The root cause is that i915 KMD has a thundering herd problem: once IRQ interrupt notifies that some task is ready on the GPU ring, KMD wakes up _all_ the waiters regardless whether they waited for the task corresponded to IRQ or not. As result, waiters start to compete for the resources and CPU usage is dramatically much bigger than what we can have.

The patch for this was provided by Chris Wilson and is under tuning. You can track it here:
http://patchwork.freedesktop.org/patch/63356/

The patch is called "RFC drm/i915: Slaughter the thundering i915_wait_request herd"

Dmitry

-----Original Message-----
From: Libva [mailto:libva-bounces at lists.freedesktop.org] On Behalf Of Steinar H. Gunderson
Sent: Wednesday, November 11, 2015 8:58 PM
To: libva at lists.freedesktop.org
Subject: Re: [Libva] High CPU usage in __i915_wait_request when encoding video

On Mon, Nov 02, 2015 at 10:28:53AM +0100, Steinar H. Gunderson wrote:
>> vaSyncSurface() just calls drm_intel_bo_wait_rendering() to make sure 
>> all GPU operations with the surface are finished.
>> drm_intel_bo_wait_rendering() is implemented with SET_DOMAIN ioctl(), 
>> I don't think it waits with busylooping.
> Then why does it show up in perf?

I also noticed that gen6_ring_get_seqno uses some CPU, again from
vaSyncSurface() -> (something) -> drm_intel_gem_bo_start_gtt_access
-> drmIoctl.

/* Steinar */
--
Homepage: https://www.sesse.net/
_______________________________________________
Libva mailing list
Libva at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libva

--------------------------------------------------------------------
Joint Stock Company Intel A/O
Registered legal address: Krylatsky Hills Business Park,
17 Krylatskaya Str., Bldg 4, Moscow 121614,
Russian Federation

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.


More information about the Libva mailing list