]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
drm/i915: Ratelimit i915_globals_park
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 18 Dec 2019 09:40:57 +0000 (09:40 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 18 Dec 2019 17:38:56 +0000 (17:38 +0000)
commit01f624f01845a1685b6070bfa6be9a13ed03b712
tree42a417468c03a48428af7a0a9d03bdb521b5b083
parent54400257ae523fa7fff11fe4209e7f9dcafdefa0
drm/i915: Ratelimit i915_globals_park

When doing our global park, we like to be a good citizen and shrink our
slab caches (of which we have quite a few now), but each
kmem_cache_shrink() incurs a stop_machine() and so ends up being quite
expensive, causing machine-wide stalls. While ideally we would like to
throw away unused pages in our slab caches whenever it appears that we
are idling, doing so will require a much cheaper mechanism. In the
meantime use a delayed worked to impose a rate-limit that means we have
to have been idle for more than 2 seconds before we start shrinking.

References: https://gitlab.freedesktop.org/drm/intel/issues/848
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191218094057.3510459-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_globals.c