]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Make request allocation caches global
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 28 Feb 2019 10:20:33 +0000 (10:20 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 28 Feb 2019 11:07:56 +0000 (11:07 +0000)
commit701d47305bee6c8ba9f2979368677c8e176e3c62
treeb8d37fcf09299b0f0edd9317479336e04a921156
parent04df857d90fdee95d657cb4294061f35019ab070
drm/i915: Make request allocation caches global

As kmem_caches share the same properties (size, allocation/free behaviour)
for all potential devices, we can use global caches. While this
potential has worse fragmentation behaviour (one can argue that
different devices would have different activity lifetimes, but you can
also argue that activity is temporal across the system) it is the
default behaviour of the system at large to amalgamate matching caches.

The benefit for us is much reduced pointer dancing along the frequent
allocation paths.

v2: Defer shrinking until after a global grace period for futureproofing
multiple consumers of the slab caches, similar to the current strategy
for avoiding shrinking too early.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190228102035.5857-1-chris@chris-wilson.co.uk
19 files changed:
drivers/gpu/drm/i915/Makefile
drivers/gpu/drm/i915/i915_active.c
drivers/gpu/drm/i915/i915_active.h
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/i915_globals.c [new file with mode: 0644]
drivers/gpu/drm/i915/i915_globals.h [new file with mode: 0644]
drivers/gpu/drm/i915/i915_pci.c
drivers/gpu/drm/i915/i915_request.c
drivers/gpu/drm/i915/i915_request.h
drivers/gpu/drm/i915/i915_scheduler.c
drivers/gpu/drm/i915/i915_scheduler.h
drivers/gpu/drm/i915/intel_guc_submission.c
drivers/gpu/drm/i915/intel_lrc.c
drivers/gpu/drm/i915/intel_ringbuffer.h
drivers/gpu/drm/i915/selftests/mock_engine.c
drivers/gpu/drm/i915/selftests/mock_gem_device.c
drivers/gpu/drm/i915/selftests/mock_request.c
drivers/gpu/drm/i915/selftests/mock_request.h