1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/gpu/drm/i915/selftests
Matthew Auld 3f882f2d4f drm/i915: improve the catch-all evict to handle lock contention
The catch-all evict can fail due to object lock contention, since it
only goes as far as trylocking the object, due to us already holding the
vm->mutex. Doing a full object lock here can deadlock, since the
vm->mutex is always our inner lock. Add another execbuf pass which drops
the vm->mutex and then tries to grab the object will the full lock,
before then retrying the eviction. This should be good enough for now to
fix the immediate regression with userspace seeing -ENOSPC from execbuf
due to contended object locks during GTT eviction.

v2 (Mani)
  - Also revamp the docs for the different passes.

Testcase: igt@gem_ppgtt@shrink-vs-evict-*
Fixes: 7e00897be8 ("drm/i915: Add object locking to i915_gem_evict_for_node and i915_gem_evict_something, v2.")
References: https://gitlab.freedesktop.org/drm/intel/-/issues/7627
References: https://gitlab.freedesktop.org/drm/intel/-/issues/7570
References: https://bugzilla.mozilla.org/show_bug.cgi?id=1779558
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Cc: Andrzej Hajda <andrzej.hajda@intel.com>
Cc: Mani Milani <mani@chromium.org>
Cc: <stable@vger.kernel.org> # v5.18+
Reviewed-by: Mani Milani <mani@chromium.org>
Tested-by: Mani Milani <mani@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20221216113456.414183-1-matthew.auld@intel.com
(cherry picked from commit 801fa7a81f)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2022-12-30 03:04:39 -05:00
..
i915_active.c drm/i915: Use str_yes_no() 2022-03-02 08:48:13 -08:00
i915_gem.c Merge tag 'drm-intel-gt-next-2022-02-17' of git://anongit.freedesktop.org/drm/drm-intel into drm-intel-next 2022-02-23 15:03:51 -05:00
i915_gem_evict.c drm/i915: improve the catch-all evict to handle lock contention 2022-12-30 03:04:39 -05:00
i915_gem_gtt.c drm/i915: use i915_sg_dma_sizes() for all backends 2022-11-09 10:07:22 +00:00
i915_live_selftests.h drm/i915/guc: Add selftest for a hung GuC 2022-07-29 10:35:55 -07:00
i915_mock_selftests.h drm: move the buddy allocator from i915 into common drm 2022-01-19 08:17:07 +01:00
i915_perf.c drm/i915/perf: Move gt-specific data from i915->perf to gt->perf 2022-10-27 12:36:30 -07:00
i915_perf_selftests.h drm/i915/gem: Zap the i915_gem_object_blt code 2021-06-17 14:23:15 +01:00
i915_random.c drm/i915/selftests: Extract random_offset() for use with a prng 2019-10-02 15:30:44 +01:00
i915_random.h drm/i915: Add missing include file <linux/math64.h> 2020-01-07 14:04:31 +00:00
i915_request.c drm/i915: call i915_request_await_object from _i915_vma_move_to_active 2022-11-16 09:27:26 +00:00
i915_selftest.c treewide: use get_random_u32() when possible 2022-10-11 17:42:58 -06:00
i915_sw_fence.c drm/i915: Drop stealing of bits from i915_sw_fence function pointer 2021-11-30 17:52:15 -08:00
i915_syncmap.c
i915_vma.c drm/i915: Rename ggtt_view as gtt_view 2022-09-08 10:24:17 +01:00
igt_atomic.c drm/i915/selftests: Move igt_atomic_section[] out of the header 2020-01-03 13:31:39 +00:00
igt_atomic.h drm/i915/selftests: Move igt_atomic_section[] out of the header 2020-01-03 13:31:39 +00:00
igt_flush_test.c drm/i915: More gt idling time with guc submission 2022-02-11 17:11:35 +05:30
igt_flush_test.h drm/i915: Drop struct_mutex from around i915_retire_requests() 2019-10-04 15:39:17 +01:00
igt_live_test.c drm/i915/selftests: Use to_gt() helper 2021-12-17 21:51:00 -08:00
igt_live_test.h drm/i915/selftests: Make headers self-contained 2020-01-03 13:33:36 +00:00
igt_mmap.c drm/i915: Use ttm mmap handling for ttm bo's. 2021-06-11 10:53:25 +02:00
igt_mmap.h drm/i915: Use ttm mmap handling for ttm bo's. 2021-06-11 10:53:25 +02:00
igt_reset.c drm/i915/selftests: Use clear_and_wake_up_bit() for the per-engine reset bitlocks 2021-11-10 09:04:30 +01:00
igt_reset.h drm/i915/gt: Use intel_gt as the primary object for handling resets 2019-07-12 21:06:56 +01:00
igt_spinner.c drm/i915/selftests: add igt_vma_move_to_active_unlocked 2022-11-16 09:27:32 +00:00
igt_spinner.h drm/i915: Add igt_spinner_pin() to allow for ww locking around spinner. 2021-03-24 17:27:21 +01:00
intel_memory_region.c drm/i915/ttm: fix sg_table construction 2022-07-11 16:35:37 +01:00
intel_scheduler_helpers.c drm/i915/selftests: Add initial GuC selftest for scrubbing lost G2H 2021-09-13 11:30:38 -07:00
intel_scheduler_helpers.h drm/i915/selftests: Add initial GuC selftest for scrubbing lost G2H 2021-09-13 11:30:38 -07:00
intel_uncore.c drm/i915/mtl: Add MTL forcewake support 2022-09-19 08:08:40 -07:00
lib_sw_fence.c drm/i915: Drop stealing of bits from i915_sw_fence function pointer 2021-11-30 17:52:15 -08:00
lib_sw_fence.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 428 2019-06-05 17:37:16 +02:00
librapl.c drm/i915/selftests: Only query RAPL for integrated power measurements 2021-04-20 10:49:05 +01:00
librapl.h drm/i915/selftests: Only query RAPL for integrated power measurements 2021-04-20 10:49:05 +01:00
mock_drm.h drm/i915/selftests: make mock_drm.h self-contained 2019-12-23 12:38:43 +02:00
mock_gem_device.c Merge drm/drm-next into drm-intel-gt-next 2022-10-03 17:04:02 +01:00
mock_gem_device.h drm/i915/selftest: Create mock_destroy_device 2020-09-21 10:36:24 +02:00
mock_gtt.c drm/i915: Use the vma resource as argument for gtt binding / unbinding 2022-01-11 10:53:14 +01:00
mock_gtt.h drm/i915: Remove unused i915->ggtt 2022-01-05 10:49:02 -08:00
mock_region.c drm/i915: use i915_sg_dma_sizes() for all backends 2022-11-09 10:07:22 +00:00
mock_region.h drm/i915: add io_size plumbing 2022-02-28 08:47:27 +00:00
mock_request.c drm/i915/selftests: Pass intel_context to mock_request 2019-08-08 13:44:31 +01:00
mock_request.h drm/i915/selftests: Pass intel_context to mock_request 2019-08-08 13:44:31 +01:00
mock_uncore.c drm/i915/selftests: Use to_gt() helper 2021-12-17 21:51:00 -08:00
mock_uncore.h drm/i915: make more headers self-contained 2019-11-08 10:16:13 +00:00
scatterlist.c drm/i915: Pull scatterlist utils out of i915_gem.h 2019-05-28 12:45:29 +01:00