]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Flush the freed object list on file close
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 2 Aug 2019 21:21:37 +0000 (22:21 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 2 Aug 2019 22:39:48 +0000 (23:39 +0100)
commitaf2112f04f82c980c8e3666be61e54cd4ebb8830
tree5e857d58e9b11b258f7f7079ef7f4273468be7eb
parent10adb618cdbe800f9aaee55dab4ca5ef9a9d261b
drm/i915: Flush the freed object list on file close

As we increase the number of RCU objects, it becomes easier for us to
have several hundred thousand objects in the deferred RCU free queues.
An example is gem_ctx_create/files which continually creates active
contexts, which are not immediately freed upon close as they are kept
alive by outstanding requests. This lack of backpressure allows the
context objects to persist until they overwhelm and starve the system.
We can increase our backpressure by flushing the freed object queue upon
closing the device fd which should then not impact other clients.

Testcase: igt/gem_ctx_create/*files
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190802212137.22207-2-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gem/i915_gem_object.c
drivers/gpu/drm/i915/i915_drv.c
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_gem.c