]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Allow kswapd to pause the device whilst reaping
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 1 Jun 2017 13:33:29 +0000 (14:33 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 2 Jun 2017 13:54:27 +0000 (14:54 +0100)
commit41e6eade6147a0b2c42e791c551a461b9e1c204e
tree362442f8e81480ded54045400c174d35396f23ae
parent35eae9d198ea8b01d187d9e8b3b6c1276c48e34e
drm/i915: Allow kswapd to pause the device whilst reaping

In commit 59d409509884 ("drm/i915: Avoid GPU stalls from kswapd") we
stopped direct reclaim and kswapd from triggering GPU/client stalls
whilst running (by restricting the objects they could reap to be idle).

However with abusive GPU usage, it becomes quite easy to starve kswapd
of memory and prevent it from making forward progress towards obtaining
enough free memory (thus driving the system closer to swap exhaustion).
Relax the previous restriction to allow kswapd (but not direct reclaim)
to stall the device whilst reaping purgeable pages.

v2: Also acquire the rpm wakelock to allow kswapd to unbind buffers.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170601133331.5973-1-chris@chris-wilson.co.uk
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
drivers/gpu/drm/i915/i915_gem_shrinker.c