* [PATCH] drm/i915: Document locking guidelines
@ 2019-08-30 10:50 Joonas Lahtinen
2019-08-30 12:10 ` ✓ Fi.CI.BAT: success for " Patchwork
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Joonas Lahtinen @ 2019-08-30 10:50 UTC (permalink / raw)
To: Intel graphics driver community testing & development
Cc: Matthew Auld, Dave Airlie, Daniel Vetter
To ensure cross-driver locking compatibility, document the expected
guidelines for implementing the GEM locking in i915. Note that this
is a description of how things should end up after being reworked,
and does not reflect the current state of things.
Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Matthew Auld <matthew.auld@intel.com>
Cc: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
Cc: CQ Tang <cq.tang@intel.com>
---
Documentation/gpu/i915.rst | 45 ++++++++++++++++++++++++++++++++++++++
1 file changed, 45 insertions(+)
diff --git a/Documentation/gpu/i915.rst b/Documentation/gpu/i915.rst
index e249ea7b0ec7..63a72d10f2c7 100644
--- a/Documentation/gpu/i915.rst
+++ b/Documentation/gpu/i915.rst
@@ -320,6 +320,51 @@ for execution also include a list of all locations within buffers that
refer to GPU-addresses so that the kernel can edit the buffer correctly.
This process is dubbed relocation.
+Locking Guidelines
+------------------
+
+**NOTE:** This is a description of how the locking should be after
+refactoring is done. Does not necessarily reflect what the locking
+looks like while WIP.
+
+#. All locking rules and interface contracts with cross-driver interfaces
+ (dma-buf, dma_fence) need to be followed.
+
+#. No struct_mutex anywhere in the code
+
+#. dma_resv will be the outermost lock (when needed) and ww_acquire_ctx
+ is to be hoisted at highest level and passed down within i915_gem_ctx
+ in the call chain
+
+#. While holding lru/memory manager (buddy, drm_mm, whatever) locks
+ system memory allocations are not allowed
+
+ * Enforce this by priming lockdep (with fs_reclaim). If we
+ allocate memory while holding these looks we get a rehash
+ of the shrinker vs. struct_mutex saga, and that would be
+ real bad.
+
+#. Do not nest different lru/memory manager locks within each other.
+ Take them in turn to update memory allocations, relying on the object’s
+ dma_resv ww_mutex to serialize against other operations.
+
+#. The suggestion for lru/memory managers locks is that they are small
+ enough to be spinlocks.
+
+#. All features need to come with exhaustive kernel selftests and/or
+ IGT tests when appropriate
+
+#. All LMEM uAPI paths need to be fully restartable (_interruptible()
+ for all locks/waits/sleeps)
+
+ * Error handling validation through signal injection.
+ Still the best strategy we have for validating GEM uAPI
+ corner cases.
+ Must be excessively used in the IGT, and we need to check
+ that we really have full path coverage of all error cases.
+
+ * -EDEADLK handling with ww_mutex
+
GEM BO Management Implementation Details
----------------------------------------
--
2.20.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 8+ messages in thread
* ✓ Fi.CI.BAT: success for drm/i915: Document locking guidelines
2019-08-30 10:50 [PATCH] drm/i915: Document locking guidelines Joonas Lahtinen
@ 2019-08-30 12:10 ` Patchwork
2019-08-31 7:39 ` ✓ Fi.CI.IGT: " Patchwork
` (2 subsequent siblings)
3 siblings, 0 replies; 8+ messages in thread
From: Patchwork @ 2019-08-30 12:10 UTC (permalink / raw)
To: Joonas Lahtinen; +Cc: intel-gfx
== Series Details ==
Series: drm/i915: Document locking guidelines
URL : https://patchwork.freedesktop.org/series/66052/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_6807 -> Patchwork_14236
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14236/
Known issues
------------
Here are the changes found in Patchwork_14236 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_exec_suspend@basic-s4-devices:
- fi-kbl-8809g: [PASS][1] -> [INCOMPLETE][2] ([fdo#103665] / [fdo#107139] / [fdo#108126])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6807/fi-kbl-8809g/igt@gem_exec_suspend@basic-s4-devices.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14236/fi-kbl-8809g/igt@gem_exec_suspend@basic-s4-devices.html
* igt@i915_selftest@live_gtt:
- fi-glk-dsi: [PASS][3] -> [DMESG-WARN][4] ([fdo#110788])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6807/fi-glk-dsi/igt@i915_selftest@live_gtt.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14236/fi-glk-dsi/igt@i915_selftest@live_gtt.html
* igt@i915_selftest@live_reset:
- fi-bsw-n3050: [PASS][5] -> [DMESG-WARN][6] ([fdo#107709])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6807/fi-bsw-n3050/igt@i915_selftest@live_reset.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14236/fi-bsw-n3050/igt@i915_selftest@live_reset.html
#### Possible fixes ####
* igt@i915_selftest@live_execlists:
- fi-skl-gvtdvm: [DMESG-FAIL][7] ([fdo#111108]) -> [PASS][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6807/fi-skl-gvtdvm/igt@i915_selftest@live_execlists.html
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14236/fi-skl-gvtdvm/igt@i915_selftest@live_execlists.html
* igt@i915_selftest@live_workarounds:
- fi-bsw-kefka: [DMESG-WARN][9] ([fdo#111373]) -> [PASS][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6807/fi-bsw-kefka/igt@i915_selftest@live_workarounds.html
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14236/fi-bsw-kefka/igt@i915_selftest@live_workarounds.html
* igt@kms_flip@basic-flip-vs-wf_vblank:
- {fi-kbl-soraka}: [FAIL][11] ([fdo#100368]) -> [PASS][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6807/fi-kbl-soraka/igt@kms_flip@basic-flip-vs-wf_vblank.html
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14236/fi-kbl-soraka/igt@kms_flip@basic-flip-vs-wf_vblank.html
* igt@kms_frontbuffer_tracking@basic:
- {fi-icl-u4}: [FAIL][13] ([fdo#103167]) -> [PASS][14]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6807/fi-icl-u4/igt@kms_frontbuffer_tracking@basic.html
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14236/fi-icl-u4/igt@kms_frontbuffer_tracking@basic.html
#### Warnings ####
* igt@i915_pm_rpm@basic-pci-d3-state:
- fi-kbl-guc: [FAIL][15] ([fdo#107707]) -> [SKIP][16] ([fdo#109271])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6807/fi-kbl-guc/igt@i915_pm_rpm@basic-pci-d3-state.html
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14236/fi-kbl-guc/igt@i915_pm_rpm@basic-pci-d3-state.html
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#100368]: https://bugs.freedesktop.org/show_bug.cgi?id=100368
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665
[fdo#106107]: https://bugs.freedesktop.org/show_bug.cgi?id=106107
[fdo#107139]: https://bugs.freedesktop.org/show_bug.cgi?id=107139
[fdo#107707]: https://bugs.freedesktop.org/show_bug.cgi?id=107707
[fdo#107709]: https://bugs.freedesktop.org/show_bug.cgi?id=107709
[fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
[fdo#108126]: https://bugs.freedesktop.org/show_bug.cgi?id=108126
[fdo#109100]: https://bugs.freedesktop.org/show_bug.cgi?id=109100
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#110788]: https://bugs.freedesktop.org/show_bug.cgi?id=110788
[fdo#111108]: https://bugs.freedesktop.org/show_bug.cgi?id=111108
[fdo#111373]: https://bugs.freedesktop.org/show_bug.cgi?id=111373
Participating hosts (51 -> 45)
------------------------------
Additional (2): fi-hsw-peppy fi-icl-u3
Missing (8): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-apl-guc fi-icl-y fi-byt-clapper fi-bdw-samus
Build changes
-------------
* CI: CI-20190529 -> None
* Linux: CI_DRM_6807 -> Patchwork_14236
CI-20190529: 20190529
CI_DRM_6807: 7dfe53944a301f8b7946e69edb570661798dd0b9 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5159: c06ee2989c012fcc43cd361e75e9ee5a3a9292df @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_14236: f7b42bdab12b0ed2105d321acece2de95a082fcd @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
f7b42bdab12b drm/i915: Document locking guidelines
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14236/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 8+ messages in thread
* ✓ Fi.CI.IGT: success for drm/i915: Document locking guidelines
2019-08-30 10:50 [PATCH] drm/i915: Document locking guidelines Joonas Lahtinen
2019-08-30 12:10 ` ✓ Fi.CI.BAT: success for " Patchwork
@ 2019-08-31 7:39 ` Patchwork
2019-09-04 16:55 ` [PATCH] " Rodrigo Vivi
2019-11-05 11:06 ` Joonas Lahtinen
3 siblings, 0 replies; 8+ messages in thread
From: Patchwork @ 2019-08-31 7:39 UTC (permalink / raw)
To: Joonas Lahtinen; +Cc: intel-gfx
== Series Details ==
Series: drm/i915: Document locking guidelines
URL : https://patchwork.freedesktop.org/series/66052/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_6807_full -> Patchwork_14236_full
====================================================
Summary
-------
**SUCCESS**
No regressions found.
Known issues
------------
Here are the changes found in Patchwork_14236_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_exec_parallel@bcs0-contexts:
- shard-hsw: [PASS][1] -> [FAIL][2] ([fdo#111469])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6807/shard-hsw1/igt@gem_exec_parallel@bcs0-contexts.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14236/shard-hsw6/igt@gem_exec_parallel@bcs0-contexts.html
* igt@gem_exec_schedule@deep-bsd:
- shard-iclb: [PASS][3] -> [SKIP][4] ([fdo#111325]) +1 similar issue
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6807/shard-iclb3/igt@gem_exec_schedule@deep-bsd.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14236/shard-iclb1/igt@gem_exec_schedule@deep-bsd.html
* igt@gem_exec_schedule@fifo-bsd1:
- shard-iclb: [PASS][5] -> [SKIP][6] ([fdo#109276]) +12 similar issues
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6807/shard-iclb4/igt@gem_exec_schedule@fifo-bsd1.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14236/shard-iclb7/igt@gem_exec_schedule@fifo-bsd1.html
* igt@i915_pm_rpm@modeset-stress-extra-wait:
- shard-iclb: [PASS][7] -> [INCOMPLETE][8] ([fdo#107713] / [fdo#108840])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6807/shard-iclb5/igt@i915_pm_rpm@modeset-stress-extra-wait.html
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14236/shard-iclb1/igt@i915_pm_rpm@modeset-stress-extra-wait.html
* igt@kms_flip@flip-vs-expired-vblank:
- shard-skl: [PASS][9] -> [FAIL][10] ([fdo#105363])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6807/shard-skl2/igt@kms_flip@flip-vs-expired-vblank.html
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14236/shard-skl7/igt@kms_flip@flip-vs-expired-vblank.html
- shard-glk: [PASS][11] -> [FAIL][12] ([fdo#105363])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6807/shard-glk2/igt@kms_flip@flip-vs-expired-vblank.html
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14236/shard-glk5/igt@kms_flip@flip-vs-expired-vblank.html
* igt@kms_flip@flip-vs-suspend:
- shard-skl: [PASS][13] -> [INCOMPLETE][14] ([fdo#109507]) +1 similar issue
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6807/shard-skl4/igt@kms_flip@flip-vs-suspend.html
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14236/shard-skl9/igt@kms_flip@flip-vs-suspend.html
* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-shrfb-msflip-blt:
- shard-iclb: [PASS][15] -> [FAIL][16] ([fdo#103167]) +2 similar issues
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6807/shard-iclb1/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-shrfb-msflip-blt.html
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14236/shard-iclb6/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-shrfb-msflip-blt.html
* igt@kms_frontbuffer_tracking@psr-suspend:
- shard-skl: [PASS][17] -> [INCOMPLETE][18] ([fdo#104108] / [fdo#106978])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6807/shard-skl9/igt@kms_frontbuffer_tracking@psr-suspend.html
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14236/shard-skl8/igt@kms_frontbuffer_tracking@psr-suspend.html
* igt@kms_plane_alpha_blend@pipe-c-coverage-7efc:
- shard-skl: [PASS][19] -> [FAIL][20] ([fdo#108145] / [fdo#110403])
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6807/shard-skl6/igt@kms_plane_alpha_blend@pipe-c-coverage-7efc.html
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14236/shard-skl9/igt@kms_plane_alpha_blend@pipe-c-coverage-7efc.html
* igt@kms_psr@psr2_cursor_render:
- shard-iclb: [PASS][21] -> [SKIP][22] ([fdo#109441]) +1 similar issue
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6807/shard-iclb2/igt@kms_psr@psr2_cursor_render.html
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14236/shard-iclb1/igt@kms_psr@psr2_cursor_render.html
* igt@kms_vblank@pipe-a-ts-continuation-dpms-suspend:
- shard-skl: [PASS][23] -> [INCOMPLETE][24] ([fdo#104108])
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6807/shard-skl9/igt@kms_vblank@pipe-a-ts-continuation-dpms-suspend.html
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14236/shard-skl8/igt@kms_vblank@pipe-a-ts-continuation-dpms-suspend.html
* igt@kms_vblank@pipe-a-ts-continuation-suspend:
- shard-apl: [PASS][25] -> [DMESG-WARN][26] ([fdo#108566]) +3 similar issues
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6807/shard-apl1/igt@kms_vblank@pipe-a-ts-continuation-suspend.html
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14236/shard-apl7/igt@kms_vblank@pipe-a-ts-continuation-suspend.html
* igt@kms_vblank@pipe-b-wait-idle-hang:
- shard-apl: [PASS][27] -> [INCOMPLETE][28] ([fdo#103927]) +1 similar issue
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6807/shard-apl7/igt@kms_vblank@pipe-b-wait-idle-hang.html
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14236/shard-apl4/igt@kms_vblank@pipe-b-wait-idle-hang.html
* igt@tools_test@tools_test:
- shard-apl: [PASS][29] -> [SKIP][30] ([fdo#109271])
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6807/shard-apl1/igt@tools_test@tools_test.html
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14236/shard-apl7/igt@tools_test@tools_test.html
- shard-glk: [PASS][31] -> [SKIP][32] ([fdo#109271])
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6807/shard-glk6/igt@tools_test@tools_test.html
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14236/shard-glk2/igt@tools_test@tools_test.html
#### Possible fixes ####
* igt@gem_exec_schedule@smoketest-bsd:
- shard-iclb: [SKIP][33] ([fdo#111325]) -> [PASS][34]
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6807/shard-iclb1/igt@gem_exec_schedule@smoketest-bsd.html
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14236/shard-iclb3/igt@gem_exec_schedule@smoketest-bsd.html
* igt@i915_pm_rpm@i2c:
- shard-hsw: [FAIL][35] ([fdo#104097]) -> [PASS][36]
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6807/shard-hsw2/igt@i915_pm_rpm@i2c.html
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14236/shard-hsw5/igt@i915_pm_rpm@i2c.html
* igt@kms_cursor_crc@pipe-c-cursor-suspend:
- shard-skl: [INCOMPLETE][37] ([fdo#110741]) -> [PASS][38]
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6807/shard-skl6/igt@kms_cursor_crc@pipe-c-cursor-suspend.html
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14236/shard-skl10/igt@kms_cursor_crc@pipe-c-cursor-suspend.html
* igt@kms_flip@flip-vs-expired-vblank-interruptible:
- shard-skl: [FAIL][39] ([fdo#105363]) -> [PASS][40]
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6807/shard-skl2/igt@kms_flip@flip-vs-expired-vblank-interruptible.html
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14236/shard-skl7/igt@kms_flip@flip-vs-expired-vblank-interruptible.html
* igt@kms_frontbuffer_tracking@fbc-suspend:
- shard-apl: [DMESG-WARN][41] ([fdo#108566]) -> [PASS][42] +5 similar issues
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6807/shard-apl4/igt@kms_frontbuffer_tracking@fbc-suspend.html
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14236/shard-apl3/igt@kms_frontbuffer_tracking@fbc-suspend.html
* igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-render:
- shard-iclb: [FAIL][43] ([fdo#103167]) -> [PASS][44] +7 similar issues
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6807/shard-iclb2/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-render.html
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14236/shard-iclb1/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-render.html
* igt@kms_plane_alpha_blend@pipe-b-constant-alpha-min:
- shard-skl: [FAIL][45] ([fdo#108145]) -> [PASS][46]
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6807/shard-skl5/igt@kms_plane_alpha_blend@pipe-b-constant-alpha-min.html
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14236/shard-skl6/igt@kms_plane_alpha_blend@pipe-b-constant-alpha-min.html
* igt@kms_psr@psr2_primary_mmap_cpu:
- shard-iclb: [SKIP][47] ([fdo#109441]) -> [PASS][48] +2 similar issues
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6807/shard-iclb6/igt@kms_psr@psr2_primary_mmap_cpu.html
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14236/shard-iclb2/igt@kms_psr@psr2_primary_mmap_cpu.html
* igt@prime_busy@hang-bsd2:
- shard-iclb: [SKIP][49] ([fdo#109276]) -> [PASS][50] +12 similar issues
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6807/shard-iclb3/igt@prime_busy@hang-bsd2.html
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14236/shard-iclb1/igt@prime_busy@hang-bsd2.html
#### Warnings ####
* igt@gem_ctx_isolation@vcs1-nonpriv:
- shard-iclb: [FAIL][51] ([fdo#111329]) -> [SKIP][52] ([fdo#109276])
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6807/shard-iclb4/igt@gem_ctx_isolation@vcs1-nonpriv.html
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14236/shard-iclb7/igt@gem_ctx_isolation@vcs1-nonpriv.html
* igt@gem_mocs_settings@mocs-settings-bsd2:
- shard-iclb: [SKIP][53] ([fdo#109276]) -> [FAIL][54] ([fdo#111330])
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6807/shard-iclb3/igt@gem_mocs_settings@mocs-settings-bsd2.html
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14236/shard-iclb2/igt@gem_mocs_settings@mocs-settings-bsd2.html
* igt@kms_content_protection@srm:
- shard-apl: [FAIL][55] ([fdo#110321]) -> [INCOMPLETE][56] ([fdo#103927])
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6807/shard-apl3/igt@kms_content_protection@srm.html
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14236/shard-apl3/igt@kms_content_protection@srm.html
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
[fdo#104097]: https://bugs.freedesktop.org/show_bug.cgi?id=104097
[fdo#104108]: https://bugs.freedesktop.org/show_bug.cgi?id=104108
[fdo#105363]: https://bugs.freedesktop.org/show_bug.cgi?id=105363
[fdo#106978]: https://bugs.freedesktop.org/show_bug.cgi?id=106978
[fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
[fdo#108840]: https://bugs.freedesktop.org/show_bug.cgi?id=108840
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#109507]: https://bugs.freedesktop.org/show_bug.cgi?id=109507
[fdo#110321]: https://bugs.freedesktop.org/show_bug.cgi?id=110321
[fdo#110403]: https://bugs.freedesktop.org/show_bug.cgi?id=110403
[fdo#110741]: https://bugs.freedesktop.org/show_bug.cgi?id=110741
[fdo#111325]: https://bugs.freedesktop.org/show_bug.cgi?id=111325
[fdo#111329]: https://bugs.freedesktop.org/show_bug.cgi?id=111329
[fdo#111330]: https://bugs.freedesktop.org/show_bug.cgi?id=111330
[fdo#111469]: https://bugs.freedesktop.org/show_bug.cgi?id=111469
Participating hosts (10 -> 10)
------------------------------
No changes in participating hosts
Build changes
-------------
* CI: CI-20190529 -> None
* Linux: CI_DRM_6807 -> Patchwork_14236
CI-20190529: 20190529
CI_DRM_6807: 7dfe53944a301f8b7946e69edb570661798dd0b9 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5159: c06ee2989c012fcc43cd361e75e9ee5a3a9292df @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_14236: f7b42bdab12b0ed2105d321acece2de95a082fcd @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14236/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] drm/i915: Document locking guidelines
2019-08-30 10:50 [PATCH] drm/i915: Document locking guidelines Joonas Lahtinen
2019-08-30 12:10 ` ✓ Fi.CI.BAT: success for " Patchwork
2019-08-31 7:39 ` ✓ Fi.CI.IGT: " Patchwork
@ 2019-09-04 16:55 ` Rodrigo Vivi
2019-11-05 11:06 ` Joonas Lahtinen
3 siblings, 0 replies; 8+ messages in thread
From: Rodrigo Vivi @ 2019-09-04 16:55 UTC (permalink / raw)
To: Joonas Lahtinen
Cc: Dave Airlie,
Intel graphics driver community testing & development,
Matthew Auld, Daniel Vetter
On Fri, Aug 30, 2019 at 01:50:53PM +0300, Joonas Lahtinen wrote:
> To ensure cross-driver locking compatibility, document the expected
> guidelines for implementing the GEM locking in i915. Note that this
> is a description of how things should end up after being reworked,
> and does not reflect the current state of things.
>
> Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Dave Airlie <airlied@redhat.com>
> Cc: Matthew Auld <matthew.auld@intel.com>
> Cc: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
> Cc: CQ Tang <cq.tang@intel.com>
> ---
> Documentation/gpu/i915.rst | 45 ++++++++++++++++++++++++++++++++++++++
> 1 file changed, 45 insertions(+)
>
> diff --git a/Documentation/gpu/i915.rst b/Documentation/gpu/i915.rst
> index e249ea7b0ec7..63a72d10f2c7 100644
> --- a/Documentation/gpu/i915.rst
> +++ b/Documentation/gpu/i915.rst
> @@ -320,6 +320,51 @@ for execution also include a list of all locations within buffers that
> refer to GPU-addresses so that the kernel can edit the buffer correctly.
> This process is dubbed relocation.
>
> +Locking Guidelines
> +------------------
> +
> +**NOTE:** This is a description of how the locking should be after
> +refactoring is done. Does not necessarily reflect what the locking
> +looks like while WIP.
Maybe use rst note block for this?
.. note::
> +
> +#. All locking rules and interface contracts with cross-driver interfaces
> + (dma-buf, dma_fence) need to be followed.
> +
> +#. No struct_mutex anywhere in the code
> +
> +#. dma_resv will be the outermost lock (when needed) and ww_acquire_ctx
> + is to be hoisted at highest level and passed down within i915_gem_ctx
> + in the call chain
> +
> +#. While holding lru/memory manager (buddy, drm_mm, whatever) locks
> + system memory allocations are not allowed
> +
> + * Enforce this by priming lockdep (with fs_reclaim). If we
> + allocate memory while holding these looks we get a rehash
> + of the shrinker vs. struct_mutex saga, and that would be
> + real bad.
> +
> +#. Do not nest different lru/memory manager locks within each other.
> + Take them in turn to update memory allocations, relying on the object’s
> + dma_resv ww_mutex to serialize against other operations.
> +
> +#. The suggestion for lru/memory managers locks is that they are small
> + enough to be spinlocks.
> +
> +#. All features need to come with exhaustive kernel selftests and/or
> + IGT tests when appropriate
> +
> +#. All LMEM uAPI paths need to be fully restartable (_interruptible()
> + for all locks/waits/sleeps)
> +
> + * Error handling validation through signal injection.
> + Still the best strategy we have for validating GEM uAPI
> + corner cases.
> + Must be excessively used in the IGT, and we need to check
> + that we really have full path coverage of all error cases.
> +
> + * -EDEADLK handling with ww_mutex
> +
It seems clear and clean to me. So from my point of view:
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> GEM BO Management Implementation Details
> ----------------------------------------
>
> --
> 2.20.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] drm/i915: Document locking guidelines
2019-08-30 10:50 [PATCH] drm/i915: Document locking guidelines Joonas Lahtinen
` (2 preceding siblings ...)
2019-09-04 16:55 ` [PATCH] " Rodrigo Vivi
@ 2019-11-05 11:06 ` Joonas Lahtinen
2019-11-05 11:06 ` [Intel-gfx] " Joonas Lahtinen
2020-04-16 19:13 ` Dave Airlie
3 siblings, 2 replies; 8+ messages in thread
From: Joonas Lahtinen @ 2019-11-05 11:06 UTC (permalink / raw)
To: Intel graphics driver community testing & development
Cc: Matthew Auld, Dave Airlie, Daniel Vetter
Dave, ping for Acked-by here so we can merge? You already gave an
early ack in IRC while travelling.
Regards, Joonas
Quoting Joonas Lahtinen (2019-08-30 13:50:53)
> To ensure cross-driver locking compatibility, document the expected
> guidelines for implementing the GEM locking in i915. Note that this
> is a description of how things should end up after being reworked,
> and does not reflect the current state of things.
>
> Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Dave Airlie <airlied@redhat.com>
> Cc: Matthew Auld <matthew.auld@intel.com>
> Cc: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
> Cc: CQ Tang <cq.tang@intel.com>
> ---
> Documentation/gpu/i915.rst | 45 ++++++++++++++++++++++++++++++++++++++
> 1 file changed, 45 insertions(+)
>
> diff --git a/Documentation/gpu/i915.rst b/Documentation/gpu/i915.rst
> index e249ea7b0ec7..63a72d10f2c7 100644
> --- a/Documentation/gpu/i915.rst
> +++ b/Documentation/gpu/i915.rst
> @@ -320,6 +320,51 @@ for execution also include a list of all locations within buffers that
> refer to GPU-addresses so that the kernel can edit the buffer correctly.
> This process is dubbed relocation.
>
> +Locking Guidelines
> +------------------
> +
> +**NOTE:** This is a description of how the locking should be after
> +refactoring is done. Does not necessarily reflect what the locking
> +looks like while WIP.
> +
> +#. All locking rules and interface contracts with cross-driver interfaces
> + (dma-buf, dma_fence) need to be followed.
> +
> +#. No struct_mutex anywhere in the code
> +
> +#. dma_resv will be the outermost lock (when needed) and ww_acquire_ctx
> + is to be hoisted at highest level and passed down within i915_gem_ctx
> + in the call chain
> +
> +#. While holding lru/memory manager (buddy, drm_mm, whatever) locks
> + system memory allocations are not allowed
> +
> + * Enforce this by priming lockdep (with fs_reclaim). If we
> + allocate memory while holding these looks we get a rehash
> + of the shrinker vs. struct_mutex saga, and that would be
> + real bad.
> +
> +#. Do not nest different lru/memory manager locks within each other.
> + Take them in turn to update memory allocations, relying on the object’s
> + dma_resv ww_mutex to serialize against other operations.
> +
> +#. The suggestion for lru/memory managers locks is that they are small
> + enough to be spinlocks.
> +
> +#. All features need to come with exhaustive kernel selftests and/or
> + IGT tests when appropriate
> +
> +#. All LMEM uAPI paths need to be fully restartable (_interruptible()
> + for all locks/waits/sleeps)
> +
> + * Error handling validation through signal injection.
> + Still the best strategy we have for validating GEM uAPI
> + corner cases.
> + Must be excessively used in the IGT, and we need to check
> + that we really have full path coverage of all error cases.
> +
> + * -EDEADLK handling with ww_mutex
> +
> GEM BO Management Implementation Details
> ----------------------------------------
>
> --
> 2.20.1
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Intel-gfx] [PATCH] drm/i915: Document locking guidelines
2019-11-05 11:06 ` Joonas Lahtinen
@ 2019-11-05 11:06 ` Joonas Lahtinen
2020-04-16 19:13 ` Dave Airlie
1 sibling, 0 replies; 8+ messages in thread
From: Joonas Lahtinen @ 2019-11-05 11:06 UTC (permalink / raw)
To: Intel graphics driver community testing & development
Cc: Matthew Auld, Dave Airlie, Daniel Vetter
Dave, ping for Acked-by here so we can merge? You already gave an
early ack in IRC while travelling.
Regards, Joonas
Quoting Joonas Lahtinen (2019-08-30 13:50:53)
> To ensure cross-driver locking compatibility, document the expected
> guidelines for implementing the GEM locking in i915. Note that this
> is a description of how things should end up after being reworked,
> and does not reflect the current state of things.
>
> Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Dave Airlie <airlied@redhat.com>
> Cc: Matthew Auld <matthew.auld@intel.com>
> Cc: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
> Cc: CQ Tang <cq.tang@intel.com>
> ---
> Documentation/gpu/i915.rst | 45 ++++++++++++++++++++++++++++++++++++++
> 1 file changed, 45 insertions(+)
>
> diff --git a/Documentation/gpu/i915.rst b/Documentation/gpu/i915.rst
> index e249ea7b0ec7..63a72d10f2c7 100644
> --- a/Documentation/gpu/i915.rst
> +++ b/Documentation/gpu/i915.rst
> @@ -320,6 +320,51 @@ for execution also include a list of all locations within buffers that
> refer to GPU-addresses so that the kernel can edit the buffer correctly.
> This process is dubbed relocation.
>
> +Locking Guidelines
> +------------------
> +
> +**NOTE:** This is a description of how the locking should be after
> +refactoring is done. Does not necessarily reflect what the locking
> +looks like while WIP.
> +
> +#. All locking rules and interface contracts with cross-driver interfaces
> + (dma-buf, dma_fence) need to be followed.
> +
> +#. No struct_mutex anywhere in the code
> +
> +#. dma_resv will be the outermost lock (when needed) and ww_acquire_ctx
> + is to be hoisted at highest level and passed down within i915_gem_ctx
> + in the call chain
> +
> +#. While holding lru/memory manager (buddy, drm_mm, whatever) locks
> + system memory allocations are not allowed
> +
> + * Enforce this by priming lockdep (with fs_reclaim). If we
> + allocate memory while holding these looks we get a rehash
> + of the shrinker vs. struct_mutex saga, and that would be
> + real bad.
> +
> +#. Do not nest different lru/memory manager locks within each other.
> + Take them in turn to update memory allocations, relying on the object’s
> + dma_resv ww_mutex to serialize against other operations.
> +
> +#. The suggestion for lru/memory managers locks is that they are small
> + enough to be spinlocks.
> +
> +#. All features need to come with exhaustive kernel selftests and/or
> + IGT tests when appropriate
> +
> +#. All LMEM uAPI paths need to be fully restartable (_interruptible()
> + for all locks/waits/sleeps)
> +
> + * Error handling validation through signal injection.
> + Still the best strategy we have for validating GEM uAPI
> + corner cases.
> + Must be excessively used in the IGT, and we need to check
> + that we really have full path coverage of all error cases.
> +
> + * -EDEADLK handling with ww_mutex
> +
> GEM BO Management Implementation Details
> ----------------------------------------
>
> --
> 2.20.1
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Intel-gfx] [PATCH] drm/i915: Document locking guidelines
2019-11-05 11:06 ` Joonas Lahtinen
2019-11-05 11:06 ` [Intel-gfx] " Joonas Lahtinen
@ 2020-04-16 19:13 ` Dave Airlie
2020-05-14 17:21 ` Joonas Lahtinen
1 sibling, 1 reply; 8+ messages in thread
From: Dave Airlie @ 2020-04-16 19:13 UTC (permalink / raw)
To: Joonas Lahtinen
Cc: Dave Airlie,
Intel graphics driver community testing & development,
Matthew Auld, Daniel Vetter
Acked-by: Dave Airlie <airlied@redhat.com>
On Tue, 5 Nov 2019 at 21:06, Joonas Lahtinen
<joonas.lahtinen@linux.intel.com> wrote:
>
> Dave, ping for Acked-by here so we can merge? You already gave an
> early ack in IRC while travelling.
>
> Regards, Joonas
>
> Quoting Joonas Lahtinen (2019-08-30 13:50:53)
> > To ensure cross-driver locking compatibility, document the expected
> > guidelines for implementing the GEM locking in i915. Note that this
> > is a description of how things should end up after being reworked,
> > and does not reflect the current state of things.
> >
> > Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> > Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Dave Airlie <airlied@redhat.com>
> > Cc: Matthew Auld <matthew.auld@intel.com>
> > Cc: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
> > Cc: CQ Tang <cq.tang@intel.com>
> > ---
> > Documentation/gpu/i915.rst | 45 ++++++++++++++++++++++++++++++++++++++
> > 1 file changed, 45 insertions(+)
> >
> > diff --git a/Documentation/gpu/i915.rst b/Documentation/gpu/i915.rst
> > index e249ea7b0ec7..63a72d10f2c7 100644
> > --- a/Documentation/gpu/i915.rst
> > +++ b/Documentation/gpu/i915.rst
> > @@ -320,6 +320,51 @@ for execution also include a list of all locations within buffers that
> > refer to GPU-addresses so that the kernel can edit the buffer correctly.
> > This process is dubbed relocation.
> >
> > +Locking Guidelines
> > +------------------
> > +
> > +**NOTE:** This is a description of how the locking should be after
> > +refactoring is done. Does not necessarily reflect what the locking
> > +looks like while WIP.
> > +
> > +#. All locking rules and interface contracts with cross-driver interfaces
> > + (dma-buf, dma_fence) need to be followed.
> > +
> > +#. No struct_mutex anywhere in the code
> > +
> > +#. dma_resv will be the outermost lock (when needed) and ww_acquire_ctx
> > + is to be hoisted at highest level and passed down within i915_gem_ctx
> > + in the call chain
> > +
> > +#. While holding lru/memory manager (buddy, drm_mm, whatever) locks
> > + system memory allocations are not allowed
> > +
> > + * Enforce this by priming lockdep (with fs_reclaim). If we
> > + allocate memory while holding these looks we get a rehash
> > + of the shrinker vs. struct_mutex saga, and that would be
> > + real bad.
> > +
> > +#. Do not nest different lru/memory manager locks within each other.
> > + Take them in turn to update memory allocations, relying on the object’s
> > + dma_resv ww_mutex to serialize against other operations.
> > +
> > +#. The suggestion for lru/memory managers locks is that they are small
> > + enough to be spinlocks.
> > +
> > +#. All features need to come with exhaustive kernel selftests and/or
> > + IGT tests when appropriate
> > +
> > +#. All LMEM uAPI paths need to be fully restartable (_interruptible()
> > + for all locks/waits/sleeps)
> > +
> > + * Error handling validation through signal injection.
> > + Still the best strategy we have for validating GEM uAPI
> > + corner cases.
> > + Must be excessively used in the IGT, and we need to check
> > + that we really have full path coverage of all error cases.
> > +
> > + * -EDEADLK handling with ww_mutex
> > +
> > GEM BO Management Implementation Details
> > ----------------------------------------
> >
> > --
> > 2.20.1
> >
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Intel-gfx] [PATCH] drm/i915: Document locking guidelines
2020-04-16 19:13 ` Dave Airlie
@ 2020-05-14 17:21 ` Joonas Lahtinen
0 siblings, 0 replies; 8+ messages in thread
From: Joonas Lahtinen @ 2020-05-14 17:21 UTC (permalink / raw)
To: Dave Airlie
Cc: Dave Airlie,
Intel graphics driver community testing & development,
Matthew Auld, Daniel Vetter
Pushed using the note:: block. Thanks for the review and ack.
Regards, Joonas
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2020-05-14 17:21 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-30 10:50 [PATCH] drm/i915: Document locking guidelines Joonas Lahtinen
2019-08-30 12:10 ` ✓ Fi.CI.BAT: success for " Patchwork
2019-08-31 7:39 ` ✓ Fi.CI.IGT: " Patchwork
2019-09-04 16:55 ` [PATCH] " Rodrigo Vivi
2019-11-05 11:06 ` Joonas Lahtinen
2019-11-05 11:06 ` [Intel-gfx] " Joonas Lahtinen
2020-04-16 19:13 ` Dave Airlie
2020-05-14 17:21 ` Joonas Lahtinen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).