drm/i915: Remove the spin-request during execbuf await_request
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 8 Jun 2017 11:14:05 +0000 (12:14 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 8 Jun 2017 11:33:09 +0000 (12:33 +0100)
commit6b567085c1bdbacea217dd628f0dbf26dd67db3f
treecd2fbca9782c449290d602f65afd3468d39c9a3c
parent735e0eb669a6bb4f6f7b9574d55b451c838747bd
drm/i915: Remove the spin-request during execbuf await_request

Originally we would enable and disable the breadcrumb interrupt
immediately on demand. This was slow enough to have a large impact
(>30%) on tasks that hopped between engines. However, by using a shadow
to keep the irq alive for an extra interrupt (see commit 67b807a89230
("drm/i915: Delay disabling the user interrupt for breadcrumbs")) and
by recently reducing the cost in adding ourselves to the signal tree, we
no longer need to spin-request during await_request to avoid delays in
throughput tests. Without the earlier patches to stop the wakeup when
signaling if the irq was already active, we saw no improvement in
execbuf overhead (and corresponding contention in other clients) despite
the removal of the spinner in a simple test like glxgears. This means
there will be scenarios where now we spend longer enabling the interrupt
than we would have spent spinning, but these are not likely to have as
noticeable an impact as the high frequency test cases (where there
should not be any regression).

Ulterior motive: generalising the engine->sync_to to handle different
types of semaphores and non-semaphores.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Oscar Mateo <oscar.mateo@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170608111405.16466-4-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_gem_request.c