drm/i915: Reduce recursive mutex locking from the shrinker
Subsystems (2)
PATCH 1/2 drm/i915: Reduce recursive mutex locking from the shrinker
From: Tvrtko Ursulin <[email protected]>
In two codepaths internal to the shrinker we know we will end up taking the resursive mutex path.
It instead feels more elegant to avoid this altogether and not call mutex_trylock_recursive in those cases.
We achieve this by extracting the shrinking part to __i915_gem_shrink, wrapped by struct mutex taking i915_gem_shrink.
At the same time move the runtime pm reference taking to always be in the usual, before struct mutex, order.
v2:
* Don't use flags but split i915_gem_shrink into locked and unlocked.
v3:
* Whitespace and checkpatch reported errors.
v4:
* Rebase.
--- drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/i915_gem_shrinker.c | 152 +++++++++++++---------- 2 files changed, 84 insertions(+), 70 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +1 -1
@@ -3178,7 +3178,7 @@ i915_gem_object_create_internal(struct drm_i915_private *dev_priv,unsigned long i915_gem_shrink (struct drm_i915_private *i915,unsigned long target,unsigned long *nr_scanned, -unsigned flags); +unsigned int flags);#define I915_SHRINK_PURGEABLE 0x1#define I915_SHRINK_UNBOUND 0x2#define I915_SHRINK_BOUND 0x4
drivers/gpu/drm/i915/i915_gem_shrinker.c +83 -69
204 lines not on this page · raw message
Signature · 6 lines
2.19.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/2 drm/i915: Fix timeout handling in i915_gem_shrinker_vmap
From: Tvrtko Ursulin <[email protected]>
The code tries to grab struct mutex for 5ms every time the unlocked GPU idle wait succeeds. But the GPU idle wait itself is practically unbound which means the 5ms timeout might not be honoured.
Cap the GPU idle wait to 5ms as well to fix this.
v2:
* Rebase.
--- drivers/gpu/drm/i915/i915_gem_shrinker.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/gpu/drm/i915/i915_gem_shrinker.c +6 -6
@@ -402,13 +402,12 @@ i915_gem_shrinker_scan(struct shrinker *shrinker, struct shrink_control *sc)static bool shrinker_lock_uninterruptible (struct drm_i915_private *i915,bool *unlock, -int timeout_ms) +unsigned long timeout) { -unsigned long timeout = jiffies +msecs_to_jiffies_timeout (timeout_ms); +const unsigned long timeout_end = jiffies + timeout; do { - if (i915_gem_wait_for_idle(i915, - 0, MAX_SCHEDULE_TIMEOUT) == 0 && + if (i915_gem_wait_for_idle(i915, 0, timeout) == 0 && shrinker_lock(i915, 0, unlock)) break;
@@ -416,7 +415,7 @@ shrinker_lock_uninterruptible(struct drm_i915_private *i915, bool *unlock,if (fatal_signal_pending (current))return false; -if (time_after (jiffies, timeout)) { +if (time_after (jiffies, timeout_end)) {pr_err ("Unable to lock GPU to purge memory.\n" );return false; }
@@ -474,11 +473,12 @@ i915_gem_shrinker_vmap(struct notifier_block *nb, unsigned long event, void *ptrstruct drm_i915_private *i915 = container_of(nb, struct drm_i915_private, mm.vmap_notifier);struct i915_vma *vma, *next; +const unsigned long timeout =msecs_to_jiffies_timeout (5000 );unsigned long freed_pages =0 ;bool unlock;int ret; -if (!shrinker_lock_uninterruptible (i915, &unlock,5000 )) +if (!shrinker_lock_uninterruptible (i915, &unlock, timeout))return NOTIFY_DONE ;/* Force everything onto the inactive lists */
Signature · 6 lines
2.19.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 2/2] drm/i915: Fix timeout handling in i915_gem_shrinker_vmap
Quoting Tvrtko Ursulin (2019-01-09 14:12:47)
Quoted 5 lines
From: Tvrtko Ursulin <[email protected]>
The code tries to grab struct mutex for 5ms every time the unlocked GPU idle wait succeeds. But the GPU idle wait itself is practically unbound which means the 5ms timeout might not be honoured.
The arbitrary timeout is merely advisory. If we hang, we get to recover everything we can!
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 2/2] drm/i915: Fix timeout handling in i915_gem_shrinker_vmap
Quoted 9 lines · Chris Wilson
Quoting Tvrtko Ursulin (2019-01-09 14:12:47)
Quoted 5 lines
From: Tvrtko Ursulin <[email protected]>
The code tries to grab struct mutex for 5ms every time the unlocked GPU idle wait succeeds. But the GPU idle wait itself is practically unbound which means the 5ms timeout might not be honoured.
The arbitrary timeout is merely advisory. If we hang, we get to recover everything we can!
You mean if we hang, eg. take more than 5ms to idle, the function bails out on the 5ms timeout check, failing to take the lock and free anything? ;)
Regards,
Tvrtko
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 2/2] drm/i915: Fix timeout handling in i915_gem_shrinker_vmap
Quoting Tvrtko Ursulin (2019-01-09 15:07:34)
Quoted 9 lines · Chris Wilson
Quoted 7 lines
Quoting Tvrtko Ursulin (2019-01-09 14:12:47)
Quoted 5 lines
From: Tvrtko Ursulin <[email protected]>
The code tries to grab struct mutex for 5ms every time the unlocked GPU idle wait succeeds. But the GPU idle wait itself is practically unbound which means the 5ms timeout might not be honoured.
Quoted 5 lines
Quoted 2 lines
The arbitrary timeout is merely advisory. If we hang, we get to recover everything we can!
You mean if we hang, eg. take more than 5ms to idle, the function bails out on the 5ms timeout check, failing to take the lock and free anything? ;)
No, just that I picked 5 _seconds_ as arbitrary timeout. As it now hits the mutex_lock() path, the whole polling + timeout is kaput. What I think we should do is use mutex_lock_killable instead. -Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 2/2] drm/i915: Fix timeout handling in i915_gem_shrinker_vmap
In reply to Tvrtko UrsulinQuoting Tvrtko Ursulin (2019-01-09 14:12:47)
Quoted 24 lines
From: Tvrtko Ursulin <[email protected]>
The code tries to grab struct mutex for 5ms every time the unlocked GPU idle wait succeeds. But the GPU idle wait itself is practically unbound which means the 5ms timeout might not be honoured.
Cap the GPU idle wait to 5ms as well to fix this.
v2:
* Rebase.Signed-off-by Tvrtko Ursulin <[email protected]>--- drivers/gpu/drm/i915/i915_gem_shrinker.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)drivers/gpu/drm/i915/i915_gem_shrinker.c +0
-0@@ -402,13 +402,12 @@ i915_gem_shrinker_scan(struct shrinker *shrinker, struct shrink_control *sc) static bool shrinker_lock_uninterruptible(struct drm_i915_private *i915, bool *unlock,
drivers/gpu/drm/i915/i915_gem_shrinker.c i915_gem_shrinker_scan(struct shrinker *shrinker, struct shrink_control *sc) · line 410
Quoted 10 lines
drivers/gpu/drm/i915/i915_gem_shrinker.c +3
-4- int timeout_ms) + unsigned long timeout) { - unsigned long timeout = jiffies + msecs_to_jiffies_timeout(timeout_ms); + const unsigned long timeout_end = jiffies + timeout; do { - if (i915_gem_wait_for_idle(i915, - 0, MAX_SCHEDULE_TIMEOUT) == 0 && + if (i915_gem_wait_for_idle(i915, 0, timeout) == 0 &&
Hmm, I wonder if this code could be hitting i915_request_wait():
#if IS_ENABLED(CONFIG_LOCKDEP)
GEM_BUG_ON(debug_locks &&
!!lockdep_is_held(&rq->i915->drm.struct_mutex) !=
!!(flags & I915_WAIT_LOCKED));#endif
as i915_gem_shrinker_vmap() could conceivably be called under struct_mutex, e.g. i915_gem_object_pin_map(), and I'm sure I've seen the vmap arena used for setting pte bits.
Onwards to removing that restriction!
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915: Reduce recursive mutex locking from the shrinker
In reply to Tvrtko Ursulin== Series Details ==
== Series Details ==
Series: series starting with [1/2] drm/i915: Reduce recursive mutex locking from the shrinker
URL : https://patchwork.freedesktop.org/series/54948/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_5383 -> Patchwork_11264
====================================================
Summary
-------
**WARNING**
Minor unknown changes coming with Patchwork_11264 need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_11264, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
External URL: https://patchwork.freedesktop.org/api/1.0/series/54948/revisions/1/
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_11264:
### IGT changes ###
#### Warnings ####
* igt@kms_busy@basic-flip-a:
- fi-kbl-7567u: SKIP -> PASS +2
* igt@kms_pipe_crc_basic@nonblocking-crc-pipe-c:
- fi-kbl-7567u: PASS -> SKIP +27
* igt@pm_rpm@basic-pci-d3-state:
- fi-bsw-kefka: SKIP -> PASS
Known issues
------------
Here are the changes found in Patchwork_11264 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@i915_selftest@live_execlists:
- fi-apl-guc: PASS -> INCOMPLETE [fdo#103927]
* igt@kms_chamelium@common-hpd-after-suspend:
- fi-kbl-7567u: PASS -> DMESG-WARN [fdo#103558] / [fdo#105079] / [fdo#105602]
* igt@kms_frontbuffer_tracking@basic:
- fi-hsw-peppy: PASS -> DMESG-WARN [fdo#102614]
- fi-byt-clapper: PASS -> FAIL [fdo#103167]
#### Possible fixes ####
* igt@debugfs_test@read_all_entries:
- fi-kbl-7567u: DMESG-WARN [fdo#103558] / [fdo#105602] -> PASS
* igt@gem_exec_suspend@basic-s3:
- fi-kbl-7567u: DMESG-WARN [fdo#103558] / [fdo#105079] / [fdo#105602] -> PASS
* igt@kms_chamelium@hdmi-edid-read:
- fi-kbl-7567u: FAIL [fdo#108767] -> PASS +2
* igt@kms_flip@basic-flip-vs-wf_vblank:
- fi-bsw-n3050: FAIL [fdo#100368] -> PASS
* igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
- fi-kbl-7567u: DMESG-FAIL [fdo#105079] -> SKIP
* igt@pm_rpm@basic-rte:
- fi-bsw-kefka: FAIL [fdo#108800] -> PASS
{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#102614]: https://bugs.freedesktop.org/show_bug.cgi?id=102614
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103558]: https://bugs.freedesktop.org/show_bug.cgi?id=103558
[fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
[fdo#105079]: https://bugs.freedesktop.org/show_bug.cgi?id=105079
[fdo#105602]: https://bugs.freedesktop.org/show_bug.cgi?id=105602
[fdo#108767]: https://bugs.freedesktop.org/show_bug.cgi?id=108767
[fdo#108800]: https://bugs.freedesktop.org/show_bug.cgi?id=108800
[fdo#108915]: https://bugs.freedesktop.org/show_bug.cgi?id=108915
[fdo#109241]: https://bugs.freedesktop.org/show_bug.cgi?id=109241
Participating hosts (48 -> 46)
------------------------------
Additional (3): fi-icl-y fi-gdg-551 fi-pnv-d510
Missing (5): fi-kbl-soraka fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-ctg-p8600
Build changes
-------------
* Linux: CI_DRM_5383 -> Patchwork_11264
CI_DRM_5383: f0835c765f5520b13d032a1904a2f90a44297b3b @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4757: 738f43a54d626f08e250c926a5aeec53458fbd3c @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_11264: b450521b73d1f64729522df0e58fb1906127b3d9 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
b450521b73d1 drm/i915: Fix timeout handling in i915_gem_shrinker_vmap d7e16a58370e drm/i915: Reduce recursive mutex locking from the shrinker
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_11264/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.IGT: success for series starting with [1/2] drm/i915: Reduce recursive mutex locking from the shrinker
In reply to Tvrtko Ursulin== Series Details ==
== Series Details ==
Series: series starting with [1/2] drm/i915: Reduce recursive mutex locking from the shrinker
URL : https://patchwork.freedesktop.org/series/54948/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_5383_full -> Patchwork_11264_full
====================================================
Summary
-------
**WARNING**
Minor unknown changes coming with Patchwork_11264_full need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_11264_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_11264_full:
### IGT changes ###
#### Warnings ####
* igt@perf_pmu@rc6:
- shard-kbl: SKIP -> PASS
* igt@pm_rc6_residency@rc6-accuracy:
- shard-snb: SKIP -> PASS
Known issues
------------
Here are the changes found in Patchwork_11264_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_userptr_blits@readonly-unsync:
- shard-skl: PASS -> TIMEOUT [fdo#108887]
* igt@kms_atomic_transition@plane-all-transition-nonblocking:
- shard-iclb: PASS -> DMESG-WARN [fdo#107724] / [fdo#109225]
* igt@kms_busy@extended-modeset-hang-newfb-render-b:
- shard-snb: PASS -> DMESG-WARN [fdo#107956]
* igt@kms_busy@extended-modeset-hang-newfb-render-c:
- shard-skl: NOTRUN -> DMESG-WARN [fdo#107956]
* igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-c:
- shard-glk: PASS -> DMESG-WARN [fdo#107956]
* igt@kms_color@pipe-a-ctm-0-5:
- shard-skl: PASS -> FAIL [fdo#108682]
* igt@kms_cursor_crc@cursor-128x42-onscreen:
- shard-iclb: NOTRUN -> FAIL [fdo#103232]
* igt@kms_cursor_crc@cursor-256x256-random:
- shard-apl: PASS -> FAIL [fdo#103232]
* igt@kms_draw_crc@draw-method-rgb565-mmap-wc-untiled:
- shard-skl: PASS -> FAIL [fdo#103184]
* igt@kms_draw_crc@draw-method-xrgb8888-mmap-wc-xtiled:
- shard-skl: PASS -> FAIL [fdo#107791]
* igt@kms_flip@2x-flip-vs-panning:
- shard-hsw: NOTRUN -> INCOMPLETE [fdo#103540]
* igt@kms_flip@flip-vs-expired-vblank-interruptible:
- shard-skl: PASS -> FAIL [fdo#105363]
* igt@kms_frontbuffer_tracking@fbc-2p-indfb-fliptrack:
- shard-glk: PASS -> FAIL [fdo#103167]
* igt@kms_frontbuffer_tracking@fbc-stridechange:
- shard-skl: NOTRUN -> FAIL [fdo#105683]
* igt@kms_frontbuffer_tracking@psr-1p-primscrn-pri-indfb-draw-blt:
- shard-iclb: PASS -> DMESG-WARN [fdo#107724] / [fdo#108336] +1
* igt@kms_frontbuffer_tracking@psr-1p-primscrn-spr-indfb-fullscreen:
- shard-iclb: PASS -> FAIL [fdo#103167] +1
* igt@kms_frontbuffer_tracking@psr-suspend:
- shard-iclb: PASS -> DMESG-FAIL [fdo#103167] / [fdo#107724]
* igt@kms_plane@plane-panning-bottom-right-suspend-pipe-a-planes:
- shard-skl: PASS -> INCOMPLETE [fdo#104108] / [fdo#107773]
* igt@kms_plane_alpha_blend@pipe-a-constant-alpha-max:
- shard-skl: NOTRUN -> FAIL [fdo#108145]
* igt@kms_plane_alpha_blend@pipe-c-alpha-opaque-fb:
- shard-glk: PASS -> FAIL [fdo#108145]
* igt@kms_plane_multiple@atomic-pipe-b-tiling-y:
- shard-glk: PASS -> FAIL [fdo#103166] +1
* igt@kms_plane_multiple@atomic-pipe-c-tiling-x:
- shard-iclb: PASS -> FAIL [fdo#103166] +1
- shard-apl: PASS -> FAIL [fdo#103166]
* igt@kms_plane_scaling@pipe-b-scaler-with-pixel-format:
- shard-iclb: PASS -> DMESG-WARN [fdo#107724] +1
* igt@kms_psr@no_drrs:
- shard-iclb: PASS -> FAIL [fdo#108341]
* igt@pm_rpm@legacy-planes-dpms:
- shard-iclb: NOTRUN -> INCOMPLETE [fdo#108840]
* igt@pm_rpm@pm-tiling:
- shard-skl: PASS -> INCOMPLETE [fdo#107807]
#### Possible fixes ####
* igt@kms_atomic_transition@1x-modeset-transitions-fencing:
- shard-skl: FAIL [fdo#107815] / [fdo#108470] -> PASS
* igt@kms_color@pipe-b-ctm-negative:
- shard-skl: FAIL [fdo#107361] -> PASS
* igt@kms_cursor_crc@cursor-64x64-sliding:
- shard-glk: FAIL [fdo#103232] -> PASS
* igt@kms_cursor_legacy@2x-long-cursor-vs-flip-atomic:
- shard-hsw: FAIL [fdo#105767] -> PASS
* igt@kms_draw_crc@draw-method-xrgb8888-mmap-cpu-ytiled:
- shard-iclb: WARN [fdo#108336] -> PASS +2
* igt@kms_draw_crc@draw-method-xrgb8888-pwrite-untiled:
- shard-skl: FAIL [fdo#108472] -> PASS
* igt@kms_flip@flip-vs-expired-vblank:
- shard-glk: FAIL [fdo#102887] / [fdo#105363] -> PASS
* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-pwrite:
- shard-iclb: FAIL [fdo#103167] -> PASS +2
* igt@kms_frontbuffer_tracking@fbc-2p-primscrn-spr-indfb-draw-mmap-wc:
- shard-glk: FAIL [fdo#103167] -> PASS
* igt@kms_frontbuffer_tracking@fbcpsr-1p-pri-indfb-multidraw:
- shard-hsw: INCOMPLETE [fdo#103540] -> SKIP
* igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-mmap-gtt:
- shard-iclb: DMESG-FAIL [fdo#107724] -> PASS +1
* igt@kms_frontbuffer_tracking@fbcpsr-stridechange:
- shard-iclb: FAIL [fdo#105683] / [fdo#108040] -> PASS
* igt@kms_frontbuffer_tracking@psr-1p-primscrn-pri-shrfb-draw-mmap-gtt:
- shard-iclb: DMESG-WARN [fdo#107724] / [fdo#108336] -> PASS +4
* igt@kms_panel_fitting@atomic-fastset:
- shard-iclb: DMESG-WARN [fdo#109263] -> PASS
* igt@kms_pipe_crc_basic@read-crc-pipe-b-frame-sequence:
- shard-skl: FAIL [fdo#103191] / [fdo#107362] -> PASS
* igt@kms_plane@plane-position-covered-pipe-b-planes:
- shard-apl: FAIL [fdo#103166] -> PASS
* igt@kms_plane_alpha_blend@pipe-b-constant-alpha-max:
- shard-apl: FAIL [fdo#108145] -> PASS
* igt@kms_plane_alpha_blend@pipe-b-coverage-7efc:
- shard-skl: FAIL [fdo#107815] -> PASS
* igt@kms_plane_multiple@atomic-pipe-b-tiling-y:
- shard-iclb: FAIL [fdo#103166] -> PASS +2
* igt@kms_plane_multiple@atomic-pipe-c-tiling-x:
- shard-glk: FAIL [fdo#103166] -> PASS
* igt@kms_rotation_crc@multiplane-rotation-cropping-top:
- shard-kbl: DMESG-WARN [fdo#105604] -> PASS
* igt@kms_vblank@pipe-b-ts-continuation-dpms-suspend:
- shard-iclb: INCOMPLETE [fdo#107713] -> PASS
* igt@kms_vblank@pipe-c-wait-forked-busy:
- shard-iclb: DMESG-WARN [fdo#107724] -> PASS +6
* igt@pm_rpm@gem-execbuf-stress:
- shard-skl: INCOMPLETE [fdo#107803] / [fdo#107807] -> PASS
* igt@pm_rpm@reg-read-ioctl:
- shard-skl: INCOMPLETE [fdo#107807] -> PASS
* igt@pm_rpm@system-suspend-execbuf:
- shard-iclb: INCOMPLETE [fdo#107713] / [fdo#108840] -> PASS
#### Warnings ####
* igt@kms_ccs@pipe-a-crc-primary-rotation-180:
- shard-iclb: DMESG-WARN [fdo#107724] / [fdo#108336] -> FAIL [fdo#107725]
* igt@kms_cursor_crc@cursor-128x42-sliding:
- shard-iclb: DMESG-WARN [fdo#107724] / [fdo#108336] -> FAIL [fdo#103232] +1
[fdo#102887]: https://bugs.freedesktop.org/show_bug.cgi?id=102887
[fdo#103166]: https://bugs.freedesktop.org/show_bug.cgi?id=103166
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103184]: https://bugs.freedesktop.org/show_bug.cgi?id=103184
[fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
[fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
[fdo#103540]: https://bugs.freedesktop.org/show_bug.cgi?id=103540
[fdo#104108]: https://bugs.freedesktop.org/show_bug.cgi?id=104108
[fdo#105363]: https://bugs.freedesktop.org/show_bug.cgi?id=105363
[fdo#105604]: https://bugs.freedesktop.org/show_bug.cgi?id=105604
[fdo#105683]: https://bugs.freedesktop.org/show_bug.cgi?id=105683
[fdo#105767]: https://bugs.freedesktop.org/show_bug.cgi?id=105767
[fdo#107361]: https://bugs.freedesktop.org/show_bug.cgi?id=107361
[fdo#107362]: https://bugs.freedesktop.org/show_bug.cgi?id=107362
[fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
[fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724
[fdo#107725]: https://bugs.freedesktop.org/show_bug.cgi?id=107725
[fdo#107773]: https://bugs.freedesktop.org/show_bug.cgi?id=107773
[fdo#107791]: https://bugs.freedesktop.org/show_bug.cgi?id=107791
[fdo#107803]: https://bugs.freedesktop.org/show_bug.cgi?id=107803
[fdo#107807]: https://bugs.freedesktop.org/show_bug.cgi?id=107807
[fdo#107815]: https://bugs.freedesktop.org/show_bug.cgi?id=107815
[fdo#107956]: https://bugs.freedesktop.org/show_bug.cgi?id=107956
[fdo#108040]: https://bugs.freedesktop.org/show_bug.cgi?id=108040
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#108336]: https://bugs.freedesktop.org/show_bug.cgi?id=108336
[fdo#108341]: https://bugs.freedesktop.org/show_bug.cgi?id=108341
[fdo#108470]: https://bugs.freedesktop.org/show_bug.cgi?id=108470
[fdo#108472]: https://bugs.freedesktop.org/show_bug.cgi?id=108472
[fdo#108682]: https://bugs.freedesktop.org/show_bug.cgi?id=108682
[fdo#108840]: https://bugs.freedesktop.org/show_bug.cgi?id=108840
[fdo#108887]: https://bugs.freedesktop.org/show_bug.cgi?id=108887
[fdo#109225]: https://bugs.freedesktop.org/show_bug.cgi?id=109225
[fdo#109263]: https://bugs.freedesktop.org/show_bug.cgi?id=109263
Participating hosts (7 -> 7)
------------------------------
No changes in participating hosts
Build changes
-------------
* Linux: CI_DRM_5383 -> Patchwork_11264
CI_DRM_5383: f0835c765f5520b13d032a1904a2f90a44297b3b @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4757: 738f43a54d626f08e250c926a5aeec53458fbd3c @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_11264: b450521b73d1f64729522df0e58fb1906127b3d9 @ 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_11264/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoting Tvrtko Ursulin (2019-01-09 14:12:46)
Quoted 8 lines
From: Tvrtko Ursulin <[email protected]>
In two codepaths internal to the shrinker we know we will end up taking the resursive mutex path.
It instead feels more elegant to avoid this altogether and not call
mutex_trylock_recursivein those cases.
Quoted 8 lines
We achieve this by extracting the shrinking part to
__i915_gem_shrink, wrapped by struct mutex takingi915_gem_shrink.At the same time move the runtime pm reference taking to always be in the usual, before struct mutex, order.
v2:
* Don't use flags but spliti915_gem_shrinkinto locked and unlocked.
Yes, I do prefer this to passing flags down, but I feel very underwhelmed by it. The fact that the recursive lock exists is the problem and this isn't reducing the problem (imo). I'd rather push the only call to shrinker_lock down to i915_gem_shrink and remove it from shrinker_scan and shrinker_vmap which should be doable in a few patches -- that would get rid of the self-inflicted recursion but still recursing from our callers.
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx