Skip to contentSkip to conversation

tests/i915/gem_ppgtt: verify GTT eviction with contended locks

PATCH Superseded Matthew Auld 3 participants 4 messages Dec 20, 2022 – Dec 21, 2022

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 tests/i915/gem_ppgtt: verify GTT eviction with contended locks

We should still be able to GTT evict objects during execbuf (old bindings can linger around), even if there is object lock contention. In the worst case the execbuf should just wait on the contented locks. Returning -ENOSPC smells like a regression from past behaviour, and seems to break userspace.

v2:
- Add coverage for explicit softpin
- Add timeout for the spinner
v3:
- Improve the test description

References: https://gitlab.freedesktop.org/drm/intel/-/issues/7570

Cc Andrzej Hajda <[email protected]>
Cc Nirmoy Das <[email protected]>
Cc Mani Milani <[email protected]>
---
 tests/i915/gem_ppgtt.c | 133 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 133 insertions(+)
tests/i915/gem_ppgtt.c +133 -0
index 9673ce22..024e8d47 100644
@@ -255,6 +255,131 @@ static void flink_and_close(void)
 	close(fd2);
 }
 
+#define PAGE_SIZE 4096
+
+static uint32_t batch_create_size(int fd, uint64_t size)
+{
+	const uint32_t bbe = MI_BATCH_BUFFER_END;
+	uint32_t handle;
+
+	handle = gem_create(fd, size);
+	gem_write(fd, handle, 0, &bbe, sizeof(bbe));
+
+	return handle;
+}
+
+#define IGT_USE_ANY	0x1
+#define IGT_USE_PINNED	0x2
+static void upload(int fd, uint32_t handle, uint32_t in_fence, uint32_t ctx_id,
+		   unsigned int flags)
+{
+	struct drm_i915_gem_exec_object2 exec[2] = {};
+	struct drm_i915_gem_execbuffer2 execbuf = {
+		.buffers_ptr = to_user_pointer(&exec),
+		.buffer_count = 1,
+		.rsvd1 = ctx_id,
+	};
+
+	if (in_fence) {
+		execbuf.rsvd2 = in_fence;
+		execbuf.flags = I915_EXEC_FENCE_IN;
+	}
+
+	exec[0].handle = handle;
+	exec[0].flags = EXEC_OBJECT_SUPPORTS_48B_ADDRESS;
+
+	if (flags & IGT_USE_PINNED)
+		exec[0].flags |= EXEC_OBJECT_PINNED; /* offset = 0 */
+
+	if (flags & IGT_USE_ANY) {
+		exec[0].flags |= EXEC_OBJECT_PAD_TO_SIZE;
+		exec[0].pad_to_size = gem_aperture_size(fd);
+	}
+
+	gem_execbuf(fd, &execbuf);
+}
+
+static void shrink_vs_evict(unsigned int flags)
+{
+	const unsigned int nproc = sysconf(_SC_NPROCESSORS_ONLN) + 1;
+	const uint64_t timeout_5s = 5000000000LL;
+	int fd = drm_open_driver(DRIVER_INTEL);
+	uint64_t ahnd = get_reloc_ahnd(fd, 0);
+	const intel_ctx_t *ctx_arr[nproc];
+	igt_spin_t *spinner;
+	uint32_t handle1;
+	int i;
+
+	/*
+	 * Try to simulate some nasty object lock contention during GTT
+	 * eviction. Create a BO and bind across several different VMs.  Invoke
+	 * the shrinker on that shared BO, followed by triggering GTT eviction
+	 * across all VMs.  Both require the object lock to make forward
+	 * progress when trying to unbind the BO, but the shrinker will be
+	 * blocked by the spinner (until killed).  Once the spinner is killed
+	 * the shrinker should be able to unbind the object and drop the object
+	 * lock, and GTT eviction should eventually succeed. At no point should
+	 * we see -ENOSPC from the execbuf, even if we can't currently grab the
+	 * object lock.
+	 */
+
+	igt_require(gem_uses_full_ppgtt(fd));
+
+	igt_drop_caches_set(fd, DROP_ALL);
+
+	handle1 = gem_create(fd, PAGE_SIZE);
+
+	spinner = igt_spin_new(fd,
+			       .ahnd = ahnd,
+			       .flags = IGT_SPIN_FENCE_OUT);
+	igt_spin_set_timeout(spinner, timeout_5s);
+
+	/*
+	 * Create several VMs to ensure we don't block on the same vm lock. The
+	 * goal of the test is to ensure that object lock contention doesn't
+	 * somehow result in -ENOSPC from execbuf, if we need to trigger GTT
+	 * eviction.
+	 */
+	for (i = 0; i < nproc; i++) {
+		ctx_arr[i] = intel_ctx_create(fd, NULL);
+
+		upload(fd, handle1, spinner->execbuf.rsvd2 >> 32,
+		       ctx_arr[i]->id, flags);
+	}
+
+	igt_fork(child, 1)
+		igt_drop_caches_set(fd, DROP_ALL);
+
+	sleep(2); /* Give the shrinker time to find handle1 */
+
+	igt_fork(child, nproc) {
+		uint32_t handle2 = gem_create(fd, PAGE_SIZE);
+
+		/*
+		 * One of these forks will be stuck on the vm mutex, since the
+		 * shrinker is holding it (along with the object lock) while
+		 * trying to unbind the chosen vma, but is blocked by the
+		 * spinner. The rest should only block waiting to grab the
+		 * object lock for handle1, before then trying to GTT evict it
+		 * from their respective vm. In either case the contention of
+		 * the vm->mutex or object lock should never result in -ENOSPC
+		 * or some other error.
+		 */
+		handle2 = batch_create_size(fd, PAGE_SIZE);
+
+		upload(fd, handle2, 0, ctx_arr[child]->id, flags);
+		gem_close(fd, handle2);
+	}
+
+	igt_waitchildren();
+	igt_spin_free(fd, spinner);
+
+	for (i = 0; i < nproc; i++)
+		intel_ctx_destroy(fd, ctx_arr[i]);
+
+	gem_close(fd, handle1);
+}
+
 static bool has_contexts(void)
 {
 	bool result;
@@ -331,4 +456,12 @@ igt_main
 
 	igt_subtest("flink-and-close-vma-leak")
 		flink_and_close();
+
+	igt_describe("Regression test to verify GTT eviction can't randomly fail due to object lock contention");
+	igt_subtest_group {
+		igt_subtest("shrink-vs-evict-any")
+			shrink_vs_evict(IGT_USE_ANY);
+		igt_subtest("shrink-vs-evict-pinned")
+			shrink_vs_evict(IGT_USE_PINNED);
+	}
 }
Signature · 1 line
2.38.1
#1 lore raw

[igt-dev] ✓ Fi.CI.BAT: success for tests/i915/gem_ppgtt: verify GTT eviction with contended locks (rev3)

== Series Details ==

== Series Details ==

Series: tests/i915/gem_ppgtt: verify GTT eviction with contended locks (rev3)
URL : https://patchwork.freedesktop.org/series/111267/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_12517 -> IGTPW_8257
====================================================

Summary
-------

**SUCCESS**

No regressions found.

External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8257/index.html

Participating hosts (41 -> 42)
------------------------------

Additional (1): bat-atsm-1

Possible new issues
-------------------

Here are the unknown changes that may have been introduced in IGTPW_8257:

### IGT changes ###

#### Suppressed ####

The following results come from untrusted machines, tests, or statuses. They do not affect the overall result.

* igt@i915_selftest@live@hangcheck:
- {bat-atsm-1}: NOTRUN -> [FAIL][1] +37 similar issues
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8257/bat-atsm-1/igt@i915_selftest@[email protected]

* igt@kms_pipe_crc_basic@read-crc-frame-sequence:
- {bat-atsm-1}: NOTRUN -> [SKIP][2] +7 similar issues
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8257/bat-atsm-1/igt@[email protected]

Known issues
------------

Here are the changes found in IGTPW_8257 that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@i915_module_load@reload:
- fi-kbl-soraka: [PASS][3] -> [DMESG-WARN][4] ([i915#1982])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12517/fi-kbl-soraka/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8257/fi-kbl-soraka/igt@[email protected]

* igt@i915_pm_rpm@basic-pci-d3-state:
- fi-ilk-650: NOTRUN -> [SKIP][5] ([fdo#109271]) +20 similar issues
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8257/fi-ilk-650/igt@[email protected]

* igt@i915_selftest@live@migrate:
- bat-adlp-4: [PASS][6] -> [DMESG-FAIL][7] ([i915#7699])
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12517/bat-adlp-4/igt@i915_selftest@[email protected]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8257/bat-adlp-4/igt@i915_selftest@[email protected]

* igt@kms_chamelium@common-hpd-after-suspend:
- fi-rkl-11600: NOTRUN -> [SKIP][8] ([fdo#111827])
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8257/fi-rkl-11600/igt@[email protected]
- bat-dg1-5: NOTRUN -> [SKIP][9] ([fdo#111827])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8257/bat-dg1-5/igt@[email protected]

* igt@kms_chamelium@dp-hpd-fast:
- fi-ilk-650: NOTRUN -> [SKIP][10] ([fdo#109271] / [fdo#111827]) +8 similar issues
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8257/fi-ilk-650/igt@[email protected]

#### Possible fixes ####

* igt@i915_selftest@live@gt_pm:
- {bat-rpls-2}: [DMESG-FAIL][11] ([i915#4258]) -> [PASS][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12517/bat-rpls-2/igt@i915_selftest@live@gt_pm.html
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8257/bat-rpls-2/igt@i915_selftest@live@gt_pm.html

* igt@i915_selftest@live@mman:
- fi-rkl-guc: [TIMEOUT][13] ([i915#6794]) -> [PASS][14]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12517/fi-rkl-guc/igt@i915_selftest@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8257/fi-rkl-guc/igt@i915_selftest@[email protected]

* igt@i915_selftest@live@workarounds:
- bat-dg1-5: [INCOMPLETE][15] ([i915#4983]) -> [PASS][16]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12517/bat-dg1-5/igt@i915_selftest@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8257/bat-dg1-5/igt@i915_selftest@[email protected]

* igt@i915_suspend@basic-s3-without-i915:
- fi-rkl-11600: [INCOMPLETE][17] ([i915#4817]) -> [PASS][18]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12517/fi-rkl-11600/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8257/fi-rkl-11600/igt@[email protected]

{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).

[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
[i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
[i915#2575]: https://gitlab.freedesktop.org/drm/intel/issues/2575
[i915#3546]: https://gitlab.freedesktop.org/drm/intel/issues/3546
[i915#4258]: https://gitlab.freedesktop.org/drm/intel/issues/4258
[i915#4817]: https://gitlab.freedesktop.org/drm/intel/issues/4817
[i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
[i915#5174]: https://gitlab.freedesktop.org/drm/intel/issues/5174
[i915#5775]: https://gitlab.freedesktop.org/drm/intel/issues/5775
[i915#6645]: https://gitlab.freedesktop.org/drm/intel/issues/6645
[i915#6794]: https://gitlab.freedesktop.org/drm/intel/issues/6794
[i915#7699]: https://gitlab.freedesktop.org/drm/intel/issues/7699

Build changes
-------------

* CI: CI-20190529 -> None
* IGT: IGT_7100 -> IGTPW_8257

CI-20190529: 20190529
CI_DRM_12517: 0ccc7ebce461c057c63b5879b8ace1a34ea8423a @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_8257: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8257/index.html
IGT_7100: 04466b02a9b5356d266a899daa5183c1f6b0e20f @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git

Testlist changes
----------------

+igt@gem_ppgtt@shrink-vs-evict-any +igt@gem_ppgtt@shrink-vs-evict-pinned -igt@kms_async_flips@async-flip-with-page-flip-events-linear

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8257/index.html

#2 lore raw

[igt-dev] ✓ Fi.CI.IGT: success for tests/i915/gem_ppgtt: verify GTT eviction with contended locks (rev3)

In reply to Matthew Auld
== Series Details ==

== Series Details ==

Series: tests/i915/gem_ppgtt: verify GTT eviction with contended locks (rev3)
URL : https://patchwork.freedesktop.org/series/111267/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_12517_full -> IGTPW_8257_full
====================================================

Summary
-------

**WARNING**

Minor unknown changes coming with IGTPW_8257_full need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in IGTPW_8257_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.

External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8257/index.html

Participating hosts (14 -> 11)
------------------------------

Missing (3): pig-skl-6260u pig-kbl-iris pig-glk-j5005

Possible new issues
-------------------

Here are the unknown changes that may have been introduced in IGTPW_8257_full:

### IGT changes ###

#### Warnings ####

* igt@gem_caching@read-writes:
- shard-apl: [INCOMPLETE][1] ([i915#7708]) -> [INCOMPLETE][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12517/shard-apl2/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8257/shard-apl8/igt@[email protected]

#### Suppressed ####

The following results come from untrusted machines, tests, or statuses. They do not affect the overall result.

* igt@fbdev@read:
- {shard-dg1}: [PASS][3] -> [FAIL][4]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12517/shard-dg1-15/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8257/shard-dg1-13/igt@[email protected]

* igt@vc4/vc4_tiling@get-bad-modifier:
- {shard-rkl}: NOTRUN -> [SKIP][5]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8257/shard-rkl-1/igt@vc4/[email protected]
- {shard-dg1}: NOTRUN -> [SKIP][6]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8257/shard-dg1-18/igt@vc4/[email protected]

New tests
---------

New tests have been introduced between CI_DRM_12517_full and IGTPW_8257_full:

### New IGT tests (2) ###

* igt@gem_ppgtt@shrink-vs-evict-any:
- Statuses : 3 pass(s) 1 skip(s)
- Exec time: [0.0] s

* igt@gem_ppgtt@shrink-vs-evict-pinned:
- Statuses : 3 pass(s) 1 skip(s)
- Exec time: [0.0] s

Known issues
------------

Here are the changes found in IGTPW_8257_full that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@gem_create@create-massive:
- shard-apl: NOTRUN -> [DMESG-WARN][7] ([i915#4991]) +1 similar issue
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8257/shard-apl8/igt@[email protected]

* igt@gem_exec_fair@basic-pace-share@rcs0:
- shard-glk: [PASS][8] -> [FAIL][9] ([i915#2842]) +3 similar issues
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12517/shard-glk9/igt@gem_exec_fair@[email protected]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8257/shard-glk7/igt@gem_exec_fair@[email protected]

* igt@gem_exec_fair@basic-pace-solo@rcs0:
- shard-apl: [PASS][10] -> [FAIL][11] ([i915#2842])
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12517/shard-apl3/igt@gem_exec_fair@[email protected]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8257/shard-apl6/igt@gem_exec_fair@[email protected]

* igt@gem_exec_schedule@thriceslice:
- shard-snb: NOTRUN -> [SKIP][12] ([fdo#109271]) +91 similar issues
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8257/shard-snb2/igt@[email protected]

* igt@gem_lmem_swapping@parallel-random-verify:
- shard-apl: NOTRUN -> [SKIP][13] ([fdo#109271] / [i915#4613]) +2 similar issues
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8257/shard-apl6/igt@[email protected]

* igt@kms_ccs@pipe-c-missing-ccs-buffer-y_tiled_gen12_mc_ccs:
- shard-apl: NOTRUN -> [SKIP][14] ([fdo#109271] / [i915#3886]) +2 similar issues
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8257/shard-apl3/igt@kms_ccs@pipe-c-missing-ccs-buffer-y_tiled_gen12_mc_ccs.html
- shard-glk: NOTRUN -> [SKIP][15] ([fdo#109271] / [i915#3886])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8257/shard-glk8/igt@kms_ccs@pipe-c-missing-ccs-buffer-y_tiled_gen12_mc_ccs.html

* igt@kms_cdclk@mode-transition:
- shard-glk: NOTRUN -> [SKIP][16] ([fdo#109271]) +50 similar issues
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8257/shard-glk2/igt@[email protected]

* igt@kms_chamelium@dp-hpd-fast:
- shard-glk: NOTRUN -> [SKIP][17] ([fdo#109271] / [fdo#111827]) +3 similar issues
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8257/shard-glk1/igt@[email protected]

* igt@kms_chamelium@vga-hpd-without-ddc:
- shard-snb: NOTRUN -> [SKIP][18] ([fdo#109271] / [fdo#111827]) +3 similar issues
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8257/shard-snb4/igt@[email protected]
- shard-apl: NOTRUN -> [SKIP][19] ([fdo#109271] / [fdo#111827]) +9 similar issues
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8257/shard-apl1/igt@[email protected]

* igt@kms_content_protection@srm@pipe-a-dp-1:
- shard-apl: NOTRUN -> [TIMEOUT][20] ([i915#7173])
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8257/shard-apl7/igt@kms_content_protection@[email protected]

* igt@kms_cursor_legacy@2x-long-flip-vs-cursor-legacy:
- shard-glk: [PASS][21] -> [FAIL][22] ([i915#72])
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12517/shard-glk8/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8257/shard-glk3/igt@[email protected]

* igt@kms_dsc@dsc-with-bpc-formats:
- shard-glk: NOTRUN -> [SKIP][23] ([fdo#109271] / [i915#7205])
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8257/shard-glk6/igt@[email protected]
- shard-apl: NOTRUN -> [SKIP][24] ([fdo#109271] / [i915#7205])
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8257/shard-apl1/igt@[email protected]

* igt@kms_frontbuffer_tracking@psr-2p-primscrn-indfb-plflip-blt:
- shard-apl: NOTRUN -> [SKIP][25] ([fdo#109271]) +103 similar issues
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8257/shard-apl2/igt@[email protected]

* igt@kms_psr2_su@page_flip-nv12:
- shard-glk: NOTRUN -> [SKIP][26] ([fdo#109271] / [i915#658]) +1 similar issue
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8257/shard-glk4/igt@kms_psr2_su@page_flip-nv12.html

* igt@kms_vblank@pipe-d-wait-idle:
- shard-apl: NOTRUN -> [SKIP][27] ([fdo#109271] / [i915#533])
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8257/shard-apl7/igt@[email protected]

* igt@kms_writeback@writeback-pixel-formats:
- shard-apl: NOTRUN -> [SKIP][28] ([fdo#109271] / [i915#2437])
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8257/shard-apl6/igt@[email protected]
- shard-glk: NOTRUN -> [SKIP][29] ([fdo#109271] / [i915#2437])
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8257/shard-glk6/igt@[email protected]

* igt@runner@aborted:
- shard-apl: NOTRUN -> ([FAIL][30], [FAIL][31]) ([i915#3002] / [i915#4312])
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8257/shard-apl6/igt@[email protected]
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8257/shard-apl8/igt@[email protected]

* igt@sysfs_clients@sema-25:
- shard-apl: NOTRUN -> [SKIP][32] ([fdo#109271] / [i915#2994])
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8257/shard-apl7/igt@[email protected]

#### Possible fixes ####

* igt@fbdev@unaligned-write:
- {shard-rkl}: [SKIP][33] ([i915#2582]) -> [PASS][34]
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12517/shard-rkl-3/igt@[email protected]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8257/shard-rkl-1/igt@[email protected]

* igt@gem_eio@in-flight-suspend:
- {shard-dg1}: [DMESG-WARN][35] -> [PASS][36] +1 similar issue
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12517/shard-dg1-18/igt@[email protected]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8257/shard-dg1-13/igt@[email protected]

* igt@gem_eio@suspend:
- {shard-rkl}: [FAIL][37] ([i915#7052]) -> [PASS][38]
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12517/shard-rkl-3/igt@[email protected]
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8257/shard-rkl-1/igt@[email protected]

* igt@gem_exec_fair@basic-deadline:
- shard-glk: [FAIL][39] ([i915#2846]) -> [PASS][40]
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12517/shard-glk4/igt@[email protected]
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8257/shard-glk9/igt@[email protected]

* igt@gem_exec_fair@basic-throttle@rcs0:
- shard-glk: [FAIL][41] ([i915#2842]) -> [PASS][42] +3 similar issues
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12517/shard-glk3/igt@gem_exec_fair@[email protected]
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8257/shard-glk5/igt@gem_exec_fair@[email protected]

* igt@gem_exec_reloc@basic-write-gtt-noreloc:
- {shard-rkl}: [SKIP][43] ([i915#3281]) -> [PASS][44] +4 similar issues
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12517/shard-rkl-3/igt@[email protected]
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8257/shard-rkl-5/igt@[email protected]

* igt@gem_pread@self:
- {shard-rkl}: [SKIP][45] ([i915#3282]) -> [PASS][46] +2 similar issues
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12517/shard-rkl-3/igt@[email protected]
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8257/shard-rkl-5/igt@[email protected]

* igt@gen9_exec_parse@basic-rejected:
- {shard-rkl}: [SKIP][47] ([i915#2527]) -> [PASS][48] +1 similar issue
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12517/shard-rkl-3/igt@[email protected]
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8257/shard-rkl-5/igt@[email protected]

* igt@i915_pm_dc@dc9-dpms:
- shard-apl: [SKIP][49] ([fdo#109271]) -> [PASS][50]
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12517/shard-apl3/igt@[email protected]
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8257/shard-apl7/igt@[email protected]

* igt@i915_pm_rpm@modeset-lpsp:
- {shard-tglu}: [SKIP][51] ([i915#1397]) -> [PASS][52]
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12517/shard-tglu-6/igt@[email protected]
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8257/shard-tglu-8/igt@[email protected]

* igt@i915_pm_rpm@modeset-lpsp-stress:
- {shard-dg1}: [SKIP][53] ([i915#1397]) -> [PASS][54] +1 similar issue
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12517/shard-dg1-15/igt@[email protected]
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8257/shard-dg1-14/igt@[email protected]

* igt@i915_pm_rps@engine-order:
- shard-apl: [FAIL][55] ([i915#6537]) -> [PASS][56]
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12517/shard-apl2/igt@[email protected]
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8257/shard-apl3/igt@[email protected]

* igt@kms_big_fb@y-tiled-max-hw-stride-32bpp-rotate-180-hflip:
- {shard-tglu}: [SKIP][57] ([i915#1845] / [i915#7651]) -> [PASS][58] +3 similar issues
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12517/shard-tglu-6/igt@[email protected]
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8257/shard-tglu-1/igt@[email protected]

* igt@kms_cursor_legacy@2x-long-flip-vs-cursor-atomic:
- shard-glk: [FAIL][59] ([i915#72]) -> [PASS][60]
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12517/shard-glk4/igt@[email protected]
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8257/shard-glk8/igt@[email protected]

* igt@kms_cursor_legacy@flip-vs-cursor@atomic-transitions:
- shard-glk: [FAIL][61] ([i915#2346]) -> [PASS][62]
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12517/shard-glk3/igt@kms_cursor_legacy@[email protected]
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8257/shard-glk9/igt@kms_cursor_legacy@[email protected]

* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-indfb-draw-mmap-gtt:
- {shard-tglu}: [SKIP][63] ([i915#1849]) -> [PASS][64] +2 similar issues
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12517/shard-tglu-6/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-indfb-draw-mmap-gtt.html
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8257/shard-tglu-4/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-indfb-draw-mmap-gtt.html

* igt@kms_frontbuffer_tracking@fbc-rgb101010-draw-pwrite:
- {shard-rkl}: [SKIP][65] ([i915#1849] / [i915#4098]) -> [PASS][66] +7 similar issues
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12517/shard-rkl-2/igt@[email protected]
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8257/shard-rkl-6/igt@[email protected]

* igt@kms_pipe_crc_basic@bad-source:
- {shard-rkl}: [SKIP][67] ([i915#1845] / [i915#4098]) -> [PASS][68] +14 similar issues
[67]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12517/shard-rkl-3/igt@[email protected]
[68]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8257/shard-rkl-6/igt@[email protected]

* igt@kms_plane@plane-position-hole@pipe-b-planes:
- {shard-rkl}: [SKIP][69] ([i915#3558]) -> [PASS][70] +1 similar issue
[69]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12517/shard-rkl-3/igt@kms_plane@[email protected]
[70]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8257/shard-rkl-6/igt@kms_plane@[email protected]

* igt@kms_psr@sprite_mmap_gtt:
- {shard-rkl}: [SKIP][71] ([i915#1072]) -> [PASS][72]
[71]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12517/shard-rkl-5/igt@kms_psr@sprite_mmap_gtt.html
[72]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8257/shard-rkl-6/igt@kms_psr@sprite_mmap_gtt.html

* igt@kms_rotation_crc@primary-x-tiled-reflect-x-0:
- {shard-tglu}: [SKIP][73] ([i915#7651]) -> [PASS][74] +7 similar issues
[73]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12517/shard-tglu-6/igt@[email protected]
[74]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8257/shard-tglu-5/igt@[email protected]

* igt@perf@gen12-oa-tlb-invalidate:
- {shard-rkl}: [SKIP][75] ([fdo#109289]) -> [PASS][76]
[75]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12517/shard-rkl-5/igt@[email protected]
[76]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8257/shard-rkl-2/igt@[email protected]

* igt@perf@polling-small-buf:
- {shard-tglu}: [FAIL][77] ([i915#1722]) -> [PASS][78]
[77]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12517/shard-tglu-6/igt@[email protected]
[78]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8257/shard-tglu-3/igt@[email protected]

* igt@perf_pmu@all-busy-idle-check-all:
- {shard-dg1}: [FAIL][79] ([i915#5234]) -> [PASS][80]
[79]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12517/shard-dg1-15/igt@[email protected]
[80]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8257/shard-dg1-13/igt@[email protected]

{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).

[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109274]: https://bugs.freedesktop.org/show_bug.cgi?id=109274
[fdo#109279]: https://bugs.freedesktop.org/show_bug.cgi?id=109279
[fdo#109280]: https://bugs.freedesktop.org/show_bug.cgi?id=109280
[fdo#109283]: https://bugs.freedesktop.org/show_bug.cgi?id=109283
[fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
[fdo#109289]: https://bugs.freedesktop.org/show_bug.cgi?id=109289
[fdo#109291]: https://bugs.freedesktop.org/show_bug.cgi?id=109291
[fdo#109295]: https://bugs.freedesktop.org/show_bug.cgi?id=109295
[fdo#109307]: https://bugs.freedesktop.org/show_bug.cgi?id=109307
[fdo#109309]: https://bugs.freedesktop.org/show_bug.cgi?id=109309
[fdo#109312]: https://bugs.freedesktop.org/show_bug.cgi?id=109312
[fdo#109313]: https://bugs.freedesktop.org/show_bug.cgi?id=109313
[fdo#109314]: https://bugs.freedesktop.org/show_bug.cgi?id=109314
[fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315
[fdo#109642]: https://bugs.freedesktop.org/show_bug.cgi?id=109642
[fdo#110189]: https://bugs.freedesktop.org/show_bug.cgi?id=110189
[fdo#110723]: https://bugs.freedesktop.org/show_bug.cgi?id=110723
[fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068
[fdo#111614]: https://bugs.freedesktop.org/show_bug.cgi?id=111614
[fdo#111615]: https://bugs.freedesktop.org/show_bug.cgi?id=111615
[fdo#111656]: https://bugs.freedesktop.org/show_bug.cgi?id=111656
[fdo#111825]: https://bugs.freedesktop.org/show_bug.cgi?id=111825
[fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
[fdo#112054]: https://bugs.freedesktop.org/show_bug.cgi?id=112054
[fdo#112283]: https://bugs.freedesktop.org/show_bug.cgi?id=112283
[i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
[i915#1257]: https://gitlab.freedesktop.org/drm/intel/issues/1257
[i915#132]: https://gitlab.freedesktop.org/drm/intel/issues/132
[i915#1397]: https://gitlab.freedesktop.org/drm/intel/issues/1397
[i915#1722]: https://gitlab.freedesktop.org/drm/intel/issues/1722
[i915#1755]: https://gitlab.freedesktop.org/drm/intel/issues/1755
[i915#1769]: https://gitlab.freedesktop.org/drm/intel/issues/1769
[i915#1825]: https://gitlab.freedesktop.org/drm/intel/issues/1825
[i915#1839]: https://gitlab.freedesktop.org/drm/intel/issues/1839
[i915#1845]: https://gitlab.freedesktop.org/drm/intel/issues/1845
[i915#1849]: https://gitlab.freedesktop.org/drm/intel/issues/1849
[i915#1902]: https://gitlab.freedesktop.org/drm/intel/issues/1902
[i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
[i915#2232]: https://gitlab.freedesktop.org/drm/intel/issues/2232
[i915#2346]: https://gitlab.freedesktop.org/drm/intel/issues/2346
[i915#2437]: https://gitlab.freedesktop.org/drm/intel/issues/2437
[i915#2527]: https://gitlab.freedesktop.org/drm/intel/issues/2527
[i915#2532]: https://gitlab.freedesktop.org/drm/intel/issues/2532
[i915#2575]: https://gitlab.freedesktop.org/drm/intel/issues/2575
[i915#2582]: https://gitlab.freedesktop.org/drm/intel/issues/2582
[i915#2587]: https://gitlab.freedesktop.org/drm/intel/issues/2587
[i915#2658]: https://gitlab.freedesktop.org/drm/intel/issues/2658
[i915#2672]: https://gitlab.freedesktop.org/drm/intel/issues/2672
[i915#2681]: https://gitlab.freedesktop.org/drm/intel/issues/2681
[i915#2705]: https://gitlab.freedesktop.org/drm/intel/issues/2705
[i915#280]: https://gitlab.freedesktop.org/drm/intel/issues/280
[i915#2842]: https://gitlab.freedesktop.org/drm/intel/issues/2842
[i915#2846]: https://gitlab.freedesktop.org/drm/intel/issues/2846
[i915#2856]: https://gitlab.freedesktop.org/drm/intel/issues/2856
[i915#2920]: https://gitlab.freedesktop.org/drm/intel/issues/2920
[i915#2994]: https://gitlab.freedesktop.org/drm/intel/issues/2994
[i915#3002]: https://gitlab.freedesktop.org/drm/intel/issues/3002
[i915#3116]: https://gitlab.freedesktop.org/drm/intel/issues/3116
[i915#3281]: https://gitlab.freedesktop.org/drm/intel/issues/3281
[i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282
[i915#3297]: https://gitlab.freedesktop.org/drm/intel/issues/3297
[i915#3299]: https://gitlab.freedesktop.org/drm/intel/issues/3299
[i915#3318]: https://gitlab.freedesktop.org/drm/intel/issues/3318
[i915#3323]: https://gitlab.freedesktop.org/drm/intel/issues/3323
[i915#3359]: https://gitlab.freedesktop.org/drm/intel/issues/3359
[i915#3458]: https://gitlab.freedesktop.org/drm/intel/issues/3458
[i915#3539]: https://gitlab.freedesktop.org/drm/intel/issues/3539
[i915#3546]: https://gitlab.freedesktop.org/drm/intel/issues/3546
[i915#3547]: https://gitlab.freedesktop.org/drm/intel/issues/3547
[i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
[i915#3558]: https://gitlab.freedesktop.org/drm/intel/issues/3558
[i915#3637]: https://gitlab.freedesktop.org/drm/intel/issues/3637
[i915#3638]: https://gitlab.freedesktop.org/drm/intel/issues/3638
[i915#3639]: https://gitlab.freedesktop.org/drm/intel/issues/3639
[i915#3689]: https://gitlab.freedesktop.org/drm/intel/issues/3689
[i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
[i915#3734]: https://gitlab.freedesktop.org/drm/intel/issues/3734
[i915#3742]: https://gitlab.freedesktop.org/drm/intel/issues/3742
[i915#3804]: https://gitlab.freedesktop.org/drm/intel/issues/3804
[i915#3840]: https://gitlab.freedesktop.org/drm/intel/issues/3840
[i915#3886]: https://gitlab.freedesktop.org/drm/intel/issues/3886
[i915#3955]: https://gitlab.freedesktop.org/drm/intel/issues/3955
[i915#3966]: https://gitlab.freedesktop.org/drm/intel/issues/3966
[i915#404]: https://gitlab.freedesktop.org/drm/intel/issues/404
[i915#4070]: https://gitlab.freedesktop.org/drm/intel/issues/4070
[i915#4077]: https://gitlab.freedesktop.org/drm/intel/issues/4077
[i915#4078]: https://gitlab.freedesktop.org/drm/intel/issues/4078
[i915#4083]: https://gitlab.freedesktop.org/drm/intel/issues/4083
[i915#4098]: https://gitlab.freedesktop.org/drm/intel/issues/4098
[i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
[i915#4212]: https://gitlab.freedesktop.org/drm/intel/issues/4212
[i915#4270]: https://gitlab.freedesktop.org/drm/intel/issues/4270
[i915#4281]: https://gitlab.freedesktop.org/drm/intel/issues/4281
[i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312
[i915#433]: https://gitlab.freedesktop.org/drm/intel/issues/433
[i915#4387]: https://gitlab.freedesktop.org/drm/intel/issues/4387
[i915#4538]: https://gitlab.freedesktop.org/drm/intel/issues/4538
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#4767]: https://gitlab.freedesktop.org/drm/intel/issues/4767
[i915#4771]: https://gitlab.freedesktop.org/drm/intel/issues/4771
[i915#4812]: https://gitlab.freedesktop.org/drm/intel/issues/4812
[i915#4833]: https://gitlab.freedesktop.org/drm/intel/issues/4833
[i915#4860]: https://gitlab.freedesktop.org/drm/intel/issues/4860
[i915#4884]: https://gitlab.freedesktop.org/drm/intel/issues/4884
[i915#4991]: https://gitlab.freedesktop.org/drm/intel/issues/4991
[i915#5176]: https://gitlab.freedesktop.org/drm/intel/issues/5176
[i915#5234]: https://gitlab.freedesktop.org/drm/intel/issues/5234
[i915#5235]: https://gitlab.freedesktop.org/drm/intel/issues/5235
[i915#5286]: https://gitlab.freedesktop.org/drm/intel/issues/5286
[i915#5288]: https://gitlab.freedesktop.org/drm/intel/issues/5288
[i915#5289]: https://gitlab.freedesktop.org/drm/intel/issues/5289
[i915#5325]: https://gitlab.freedesktop.org/drm/intel/issues/5325
[i915#5327]: https://gitlab.freedesktop.org/drm/intel/issues/5327
[i915#533]: https://gitlab.freedesktop.org/drm/intel/issues/533
[i915#5461]: https://gitlab.freedesktop.org/drm/intel/issues/5461
[i915#5563]: https://gitlab.freedesktop.org/drm/intel/issues/5563
[i915#5784]: https://gitlab.freedesktop.org/drm/intel/issues/5784
[i915#6095]: https://gitlab.freedesktop.org/drm/intel/issues/6095
[i915#6230]: https://gitlab.freedesktop.org/drm/intel/issues/6230
[i915#6247]: https://gitlab.freedesktop.org/drm/intel/issues/6247
[i915#6248]: https://gitlab.freedesktop.org/drm/intel/issues/6248
[i915#6301]: https://gitlab.freedesktop.org/drm/intel/issues/6301
[i915#6335]: https://gitlab.freedesktop.org/drm/intel/issues/6335
[i915#6344]: https://gitlab.freedesktop.org/drm/intel/issues/6344
[i915#6412]: https://gitlab.freedesktop.org/drm/intel/issues/6412
[i915#6433]: https://gitlab.freedesktop.org/drm/intel/issues/6433
[i915#6497]: https://gitlab.freedesktop.org/drm/intel/issues/6497
[i915#6524]: https://gitlab.freedesktop.org/drm/intel/issues/6524
[i915#6537]: https://gitlab.freedesktop.org/drm/intel/issues/6537
[i915#658]: https://gitlab.freedesktop.org/drm/intel/issues/658
[i915#6768]: https://gitlab.freedesktop.org/drm/intel/issues/6768
[i915#6944]: https://gitlab.freedesktop.org/drm/intel/issues/6944
[i915#6946]: https://gitlab.freedesktop.org/drm/intel/issues/6946
[i915#6953]: https://gitlab.freedesktop.org/drm/intel/issues/6953
[i915#7037]: https://gitlab.freedesktop.org/drm/intel/issues/7037
[i915#7052]: https://gitlab.freedesktop.org/drm/intel/issues/7052
[i915#7116]: https://gitlab.freedesktop.org/drm/intel/issues/7116
[i915#7118]: https://gitlab.freedesktop.org/drm/intel/issues/7118
[i915#7128]: https://gitlab.freedesktop.org/drm/intel/issues/7128
[i915#7173]: https://gitlab.freedesktop.org/drm/intel/issues/7173
[i915#72]: https://gitlab.freedesktop.org/drm/intel/issues/72
[i915#7205]: https://gitlab.freedesktop.org/drm/intel/issues/7205
[i915#7276]: https://gitlab.freedesktop.org/drm/intel/issues/7276
[i915#7561]: https://gitlab.freedesktop.org/drm/intel/issues/7561
[i915#7582]: https://gitlab.freedesktop.org/drm/intel/issues/7582
[i915#7651]: https://gitlab.freedesktop.org/drm/intel/issues/7651
[i915#7697]: https://gitlab.freedesktop.org/drm/intel/issues/7697
[i915#7701]: https://gitlab.freedesktop.org/drm/intel/issues/7701
[i915#7707]: https://gitlab.freedesktop.org/drm/intel/issues/7707
[i915#7708]: https://gitlab.freedesktop.org/drm/intel/issues/7708
[i915#7711]: https://gitlab.freedesktop.org/drm/intel/issues/7711

Build changes
-------------

* CI: CI-20190529 -> None
* IGT: IGT_7100 -> IGTPW_8257
* Piglit: piglit_4509 -> None

CI-20190529: 20190529
CI_DRM_12517: 0ccc7ebce461c057c63b5879b8ace1a34ea8423a @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_8257: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8257/index.html
IGT_7100: 04466b02a9b5356d266a899daa5183c1f6b0e20f @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8257/index.html

Reviewed-by Nirmoy Das on v3 1/1
#3 lore raw
In reply to Matthew Auld
Quoted 67 lines · Matthew Auld

We should still be able to GTT evict objects during execbuf (old bindings can linger around), even if there is object lock contention. In the worst case the execbuf should just wait on the contented locks. Returning -ENOSPC smells like a regression from past behaviour, and seems to break userspace.

v2:
- Add coverage for explicit softpin
- Add timeout for the spinner
v3:
- Improve the test description

References: https://gitlab.freedesktop.org/drm/intel/-/issues/7570

Cc Andrzej Hajda <[email protected]>
Cc Nirmoy Das <[email protected]>
Cc Mani Milani <[email protected]>
---
  tests/i915/gem_ppgtt.c | 133 +++++++++++++++++++++++++++++++++++++++++
  1 file changed, 133 insertions(+)
tests/i915/gem_ppgtt.c +38 -0
index 9673ce22..024e8d47 100644
@@ -255,6 +255,131 @@ static void flink_and_close(void)
  	close(fd2);
  }
 
+#define PAGE_SIZE 4096
+
+static uint32_t batch_create_size(int fd, uint64_t size)
+{
+	const uint32_t bbe = MI_BATCH_BUFFER_END;
+	uint32_t handle;
+
+	handle = gem_create(fd, size);
+	gem_write(fd, handle, 0, &bbe, sizeof(bbe));
+
+	return handle;
+}
+
+#define IGT_USE_ANY	0x1
+#define IGT_USE_PINNED	0x2
+static void upload(int fd, uint32_t handle, uint32_t in_fence, uint32_t ctx_id,
+		   unsigned int flags)
+{
+	struct drm_i915_gem_exec_object2 exec[2] = {};
+	struct drm_i915_gem_execbuffer2 execbuf = {
+		.buffers_ptr = to_user_pointer(&exec),
+		.buffer_count = 1,
+		.rsvd1 = ctx_id,
+	};
+
+	if (in_fence) {
+		execbuf.rsvd2 = in_fence;
+		execbuf.flags = I915_EXEC_FENCE_IN;
+	}
+
+	exec[0].handle = handle;
+	exec[0].flags = EXEC_OBJECT_SUPPORTS_48B_ADDRESS;
+
+	if (flags & IGT_USE_PINNED)
+		exec[0].flags |= EXEC_OBJECT_PINNED; /* offset = 0 */
+
+	if (flags & IGT_USE_ANY) {
+		exec[0].flags |= EXEC_OBJECT_PAD_TO_SIZE;

tests/i915/gem_ppgtt.c static void flink_and_close(void) · line 305

Quoted 10 lines
tests/i915/gem_ppgtt.c +10 -0
+		exec[0].pad_to_size = gem_aperture_size(fd);
+	}
+
+	gem_execbuf(fd, &execbuf);
+}
+
+static void shrink_vs_evict(unsigned int flags)
+{
+	const unsigned int nproc = sysconf(_SC_NPROCESSORS_ONLN) + 1;
+	const uint64_t timeout_5s = 5000000000LL;

5*NSEC_PER_SEC would be nice.

Quoted 53 lines
tests/i915/gem_ppgtt.c +53 -0
+	int fd = drm_open_driver(DRIVER_INTEL);
+	uint64_t ahnd = get_reloc_ahnd(fd, 0);
+	const intel_ctx_t *ctx_arr[nproc];
+	igt_spin_t *spinner;
+	uint32_t handle1;
+	int i;
+
+	/*
+	 * Try to simulate some nasty object lock contention during GTT
+	 * eviction. Create a BO and bind across several different VMs.  Invoke
+	 * the shrinker on that shared BO, followed by triggering GTT eviction
+	 * across all VMs.  Both require the object lock to make forward
+	 * progress when trying to unbind the BO, but the shrinker will be
+	 * blocked by the spinner (until killed).  Once the spinner is killed
+	 * the shrinker should be able to unbind the object and drop the object
+	 * lock, and GTT eviction should eventually succeed. At no point should
+	 * we see -ENOSPC from the execbuf, even if we can't currently grab the
+	 * object lock.
+	 */
+
+	igt_require(gem_uses_full_ppgtt(fd));
+
+	igt_drop_caches_set(fd, DROP_ALL);
+
+	handle1 = gem_create(fd, PAGE_SIZE);
+
+	spinner = igt_spin_new(fd,
+			       .ahnd = ahnd,
+			       .flags = IGT_SPIN_FENCE_OUT);
+	igt_spin_set_timeout(spinner, timeout_5s);
+
+	/*
+	 * Create several VMs to ensure we don't block on the same vm lock. The
+	 * goal of the test is to ensure that object lock contention doesn't
+	 * somehow result in -ENOSPC from execbuf, if we need to trigger GTT
+	 * eviction.
+	 */
+	for (i = 0; i < nproc; i++) {
+		ctx_arr[i] = intel_ctx_create(fd, NULL);
+
+		upload(fd, handle1, spinner->execbuf.rsvd2 >> 32,
+		       ctx_arr[i]->id, flags);
+	}
+
+	igt_fork(child, 1)
+		igt_drop_caches_set(fd, DROP_ALL);
+
+	sleep(2); /* Give the shrinker time to find handle1 */
+
+	igt_fork(child, nproc) {
+		uint32_t handle2 = gem_create(fd, PAGE_SIZE);
+
+		/*

tests/i915/gem_ppgtt.c static void flink_and_close(void) · line 368

Quoted 10 lines
tests/i915/gem_ppgtt.c +10 -0
+		 * One of these forks will be stuck on the vm mutex, since the
+		 * shrinker is holding it (along with the object lock) while
+		 * trying to unbind the chosen vma, but is blocked by the
+		 * spinner. The rest should only block waiting to grab the
+		 * object lock for handle1, before then trying to GTT evict it
+		 * from their respective vm. In either case the contention of
+		 * the vm->mutex or object lock should never result in -ENOSPC
+		 * or some other error.
+		 */
+		handle2 = batch_create_size(fd, PAGE_SIZE);

This can be

uint32_t handle2 = batch_create_size(fd, PAGE_SIZE);

Above gem_create seems unnecessary. With those

Quoted 30 lines
tests/i915/gem_ppgtt.c +22 -0
+
+		upload(fd, handle2, 0, ctx_arr[child]->id, flags);
+		gem_close(fd, handle2);
+	}
+
+	igt_waitchildren();
+	igt_spin_free(fd, spinner);
+
+	for (i = 0; i < nproc; i++)
+		intel_ctx_destroy(fd, ctx_arr[i]);
+
+	gem_close(fd, handle1);
+}
+
  static bool has_contexts(void)
  {
  	bool result;
@@ -331,4 +456,12 @@ igt_main
 
  	igt_subtest("flink-and-close-vma-leak")
  		flink_and_close();
+
+	igt_describe("Regression test to verify GTT eviction can't randomly fail due to object lock contention");
+	igt_subtest_group {
+		igt_subtest("shrink-vs-evict-any")
+			shrink_vs_evict(IGT_USE_ANY);
+		igt_subtest("shrink-vs-evict-pinned")
+			shrink_vs_evict(IGT_USE_PINNED);
+	}
  }