Skip to contentSkip to conversation

Avoid caching ioctl during fork

PATCH Superseded Vikas Srivastava 2 participants 2 messages Oct 19, 2022

v1 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Avoid caching ioctl during fork

Both gem_exec_flush and gem_ctx_engines require the SET_CACHING ioctl for some subtests. The ioctl itself, called by gem_set_caching, is wrapped in an igt_require, forcing a skip when the ioctl fails. MTL currently fails this check with -EOPNOTSUPP 100% of the time.

Normally, the ioctl failing and causing a test skip wouldn't be a problem. Howerver, the failing call to the ioctl is made within a forked child process in some cases, which causes an error to occur. By checking whether or not caching is supported before these cases occur, the resulting error can be downgraded to a graceful skip.

v2: The gem_ctx_engines subtest does not require using gem_set_caching if the domain is moved from CPU to WC, so the ioctl was removed from the execution path.
v3: Replace gem_mmap__cpu with gem_mmap__device_coherent instead of gem_mmap__wc in gem_ctx_engines.c
v4: Fix formatting

References: VLK-34086

---
 tests/i915/gem_ctx_engines.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)
tests/i915/gem_ctx_engines.c +4 -7
index b0646516..e9cc25d6 100644
@@ -492,12 +492,10 @@ static void independent(int i915, const intel_ctx_t *base_ctx,
 	}
 	param.ctx_id = gem_context_create(i915);
 	gem_context_set_param(i915, &param);
-
-	if (!gem_has_lmem(i915))
-		gem_set_caching(i915, results.handle, I915_CACHING_CACHED);
-	map = gem_mmap__cpu(i915, results.handle, 0, 4096, PROT_READ);
+	
+	map = gem_mmap__device_coherent(i915, results.handle, 0, 4096, PROT_READ);
 	gem_set_domain(i915, results.handle,
-		       I915_GEM_DOMAIN_CPU, I915_GEM_DOMAIN_CPU);
+		       I915_GEM_DOMAIN_WC, I915_GEM_DOMAIN_WC);
 
 	for (int i = 0; i < I915_EXEC_RING_MASK + 1; i++) {
 		struct drm_i915_gem_exec_object2 obj[2] = {
@@ -515,8 +513,7 @@ static void independent(int i915, const intel_ctx_t *base_ctx,
 		uint32_t *cs;
 		int j = 0;
 
-		cs = gem_mmap__cpu(i915, obj[1].handle, 0, 4096, PROT_WRITE);
-
+		cs = gem_mmap__device_coherent(i915, obj[1].handle, 0, 4096, PROT_WRITE);
 		cs[j] = 0x24 << 23 | 1; /* SRM */
 		if (has_64bit_reloc)
 			cs[j]++;
Signature · 1 line
2.25.1
#1 lore raw

[igt-dev] ✗ Fi.CI.BAT: failure for Avoid caching ioctl during fork (rev4)

== Series Details ==

== Series Details ==

Series: Avoid caching ioctl during fork (rev4)
URL : https://patchwork.freedesktop.org/series/109753/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_12260 -> IGTPW_7983
====================================================

Summary
-------

**FAILURE**

Serious unknown changes coming with IGTPW_7983 absolutely need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in IGTPW_7983, 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_7983/index.html

Participating hosts (41 -> 40)
------------------------------

Missing (1): fi-pnv-d510

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

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

### IGT changes ###

#### Possible regressions ####

* igt@i915_selftest@live@gem_contexts:
- fi-cfl-8109u: [PASS][1] -> [DMESG-FAIL][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12260/fi-cfl-8109u/igt@i915_selftest@live@gem_contexts.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7983/fi-cfl-8109u/igt@i915_selftest@live@gem_contexts.html
- fi-adl-ddr5: [PASS][3] -> [DMESG-FAIL][4]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12260/fi-adl-ddr5/igt@i915_selftest@live@gem_contexts.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7983/fi-adl-ddr5/igt@i915_selftest@live@gem_contexts.html

* igt@i915_suspend@basic-s2idle-without-i915:
- fi-bdw-5557u: [PASS][5] -> [INCOMPLETE][6]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12260/fi-bdw-5557u/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7983/fi-bdw-5557u/igt@[email protected]

#### Suppressed ####

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

* igt@i915_module_load@load:
- {bat-dg2-8}: [PASS][7] -> [FAIL][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12260/bat-dg2-8/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7983/bat-dg2-8/igt@[email protected]

* igt@i915_pm_rpm@basic-rte:
- {bat-rplp-1}: [PASS][9] -> [DMESG-WARN][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12260/bat-rplp-1/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7983/bat-rplp-1/igt@[email protected]

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

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

### IGT changes ###

#### Issues hit ####

* igt@runner@aborted:
- fi-bdw-5557u: NOTRUN -> [FAIL][11] ([i915#4312])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7983/fi-bdw-5557u/igt@[email protected]

#### Possible fixes ####

* igt@debugfs_test@read_all_entries:
- {fi-tgl-mst}: [DMESG-WARN][12] ([i915#6434]) -> [PASS][13]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12260/fi-tgl-mst/igt@debugfs_test@read_all_entries.html
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7983/fi-tgl-mst/igt@debugfs_test@read_all_entries.html

* igt@gem_exec_suspend@basic-s3@smem:
- {bat-rpls-1}: [DMESG-WARN][14] ([i915#6687]) -> [PASS][15]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12260/bat-rpls-1/igt@gem_exec_suspend@[email protected]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7983/bat-rpls-1/igt@gem_exec_suspend@[email protected]

* igt@i915_module_load@reload:
- {bat-rpls-2}: [DMESG-WARN][16] ([i915#5537]) -> [PASS][17]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12260/bat-rpls-2/igt@[email protected]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7983/bat-rpls-2/igt@[email protected]

* igt@i915_selftest@live@gem_contexts:
- fi-glk-j4005: [DMESG-FAIL][18] -> [PASS][19]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12260/fi-glk-j4005/igt@i915_selftest@live@gem_contexts.html
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7983/fi-glk-j4005/igt@i915_selftest@live@gem_contexts.html

* igt@i915_selftest@live@gt_heartbeat:
- fi-apl-guc: [DMESG-FAIL][20] ([i915#5334]) -> [PASS][21]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12260/fi-apl-guc/igt@i915_selftest@live@gt_heartbeat.html
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7983/fi-apl-guc/igt@i915_selftest@live@gt_heartbeat.html
- fi-bxt-dsi: [DMESG-FAIL][22] ([i915#5334]) -> [PASS][23]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12260/fi-bxt-dsi/igt@i915_selftest@live@gt_heartbeat.html
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7983/fi-bxt-dsi/igt@i915_selftest@live@gt_heartbeat.html

* igt@i915_selftest@live@hangcheck:
- {fi-ehl-2}: [INCOMPLETE][24] ([i915#5153]) -> [PASS][25]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12260/fi-ehl-2/igt@i915_selftest@[email protected]
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7983/fi-ehl-2/igt@i915_selftest@[email protected]

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

[fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
[i915#1845]: https://gitlab.freedesktop.org/drm/intel/issues/1845
[i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312
[i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
[i915#5153]: https://gitlab.freedesktop.org/drm/intel/issues/5153
[i915#5334]: https://gitlab.freedesktop.org/drm/intel/issues/5334
[i915#5537]: https://gitlab.freedesktop.org/drm/intel/issues/5537
[i915#6367]: https://gitlab.freedesktop.org/drm/intel/issues/6367
[i915#6434]: https://gitlab.freedesktop.org/drm/intel/issues/6434
[i915#6687]: https://gitlab.freedesktop.org/drm/intel/issues/6687
[i915#7174]: https://gitlab.freedesktop.org/drm/intel/issues/7174
[i915#7269]: https://gitlab.freedesktop.org/drm/intel/issues/7269
[i915#7270]: https://gitlab.freedesktop.org/drm/intel/issues/7270

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

* CI: CI-20190529 -> None
* IGT: IGT_7019 -> IGTPW_7983

CI-20190529: 20190529
CI_DRM_12260: 1baacaef99f89e381bae8c276ebbd4d86a6fce59 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_7983: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7983/index.html
IGT_7019: fdbafce2b74e84739bb1d81223ae6f01fb442980 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git

== Logs ==

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