]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Drop flushing of the object free list/worker from i915_gem_suspend
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 27 Jun 2017 17:37:31 +0000 (18:37 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 28 Jun 2017 11:15:20 +0000 (12:15 +0100)
commitbb6f88b30accddbd44f5ba8c672baa8978c12ef9
tree092532c8c3c538b55dd76e48810dc048f257a572
parent8c679f4c723f765d36ac7f40d18691073fcfeba9
drm/i915: Drop flushing of the object free list/worker from i915_gem_suspend

i915_gem_suspend() is called from all of our finalization paths
(suspend, hibernate, unload). i915_gem_drain_freed_objects() adds an
arbitrary delay as it uses an rcu_barrier() to ensure that there are no
more freed objects in flight, and this delay causes a large amount of
variability in suspend timings. For S3 suspend, we do not need to free
pages as doing so does not impact at all upon the system in its
suspended state, unlike S4 hibernation where we do want the hibernation
image to be as small as possible. Therefore we can forgo waiting inside
i915_gem_suspend(), so long as we ensure that we do cleanup before
unload (see i915_gem_load_cleanup()) and prefer to reap our objects
prior to hibernation (see i915_gem_freeze()).

Removing the rcu_barrier() from i915_gem_suspend() improves S3 latency
by about 30ms on Skylake (ymmv).

Reported-by: David Weinehall <david.weinehall@linux.intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: David Weinehall <david.weinehall@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170627173731.11566-1-chris@chris-wilson.co.uk
Tested-by: David Weinehall <david.weinehall@linux.intel.com>
Reviewed-by: David Weinehall <david.weinehall@linux.intel.com>
drivers/gpu/drm/i915/i915_gem.c