* [Intel-gfx] [PATCH] drm/i915/gem: Avoid waiting inside mmu_notifier_invalidate_range @ 2020-05-22 3:01 Chris Wilson 2020-05-22 4:07 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork 2020-05-22 22:49 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork 0 siblings, 2 replies; 3+ messages in thread From: Chris Wilson @ 2020-05-22 3:01 UTC (permalink / raw) To: intel-gfx; +Cc: Chris Wilson Since the userptr may be invalidated from inside a reclaim path, we cannot wait on unbinding the object as we may hold any number of locks, including the active reference of the object we are trying to invalidate. E.g. [<0>] __i915_active_wait+0x70/0xc0 [i915] [<0>] i915_vma_unbind+0x2f/0x110 [i915] [<0>] i915_gem_object_unbind+0x17c/0x350 [i915] [<0>] userptr_mn_invalidate_range_start+0xb6/0x140 [i915] [<0>] __mmu_notifier_invalidate_range_start+0x105/0x150 [<0>] try_to_unmap_one+0x7fb/0x900 [<0>] rmap_walk_file+0xe4/0x240 [<0>] try_to_unmap+0x85/0xc0 [<0>] shrink_page_list+0x885/0xe80 [<0>] shrink_inactive_list+0x155/0x260 [<0>] shrink_lruvec+0x4ec/0x5f0 [<0>] shrink_node+0x15b/0x410 [<0>] try_to_free_pages+0x169/0x3a0 [<0>] __alloc_pages_slowpath.constprop.0+0x251/0xa00 [<0>] __alloc_pages_nodemask+0x144/0x170 [<0>] new_slab+0x259/0x280 [<0>] ___slab_alloc.isra.0.constprop.0+0x3dd/0x460 [<0>] __slab_alloc.isra.0.constprop.0+0x9/0x10 [<0>] kmem_cache_alloc+0x11a/0x130 [<0>] alloc_pd+0x17/0x60 [i915] [<0>] __gen8_ppgtt_alloc+0x2d7/0x350 [i915] [<0>] gen8_ppgtt_alloc+0x35/0x70 [i915] [<0>] ppgtt_bind_vma+0x29/0x70 [i915] This situation only occurs when the lru page shrinker tries to sacrifice one the objects it is trying to allocate for. However, we do have to wait for an active object so that we can revoke access to the page range. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/1702 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> --- drivers/gpu/drm/i915/gem/i915_gem_userptr.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/gem/i915_gem_userptr.c b/drivers/gpu/drm/i915/gem/i915_gem_userptr.c index 8b0708708671..a398d817543e 100644 --- a/drivers/gpu/drm/i915/gem/i915_gem_userptr.c +++ b/drivers/gpu/drm/i915/gem/i915_gem_userptr.c @@ -126,9 +126,11 @@ userptr_mn_invalidate_range_start(struct mmu_notifier *_mn, } spin_unlock(&mn->lock); - ret = i915_gem_object_unbind(obj, - I915_GEM_OBJECT_UNBIND_ACTIVE | - I915_GEM_OBJECT_UNBIND_BARRIER); + ret = i915_gem_object_wait(obj, + I915_WAIT_ALL, + MAX_SCHEDULE_TIMEOUT); + if (ret == 0) + ret = i915_gem_object_unbind(obj, 0); if (ret == 0) ret = __i915_gem_object_put_pages(obj); i915_gem_object_put(obj); -- 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] 3+ messages in thread
* [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/gem: Avoid waiting inside mmu_notifier_invalidate_range 2020-05-22 3:01 [Intel-gfx] [PATCH] drm/i915/gem: Avoid waiting inside mmu_notifier_invalidate_range Chris Wilson @ 2020-05-22 4:07 ` Patchwork 2020-05-22 22:49 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork 1 sibling, 0 replies; 3+ messages in thread From: Patchwork @ 2020-05-22 4:07 UTC (permalink / raw) To: Chris Wilson; +Cc: intel-gfx == Series Details == Series: drm/i915/gem: Avoid waiting inside mmu_notifier_invalidate_range URL : https://patchwork.freedesktop.org/series/77529/ State : success == Summary == CI Bug Log - changes from CI_DRM_8523 -> Patchwork_17755 ==================================================== Summary ------- **SUCCESS** No regressions found. External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17755/index.html Known issues ------------ Here are the changes found in Patchwork_17755 that come from known issues: ### IGT changes ### #### Possible fixes #### * igt@debugfs_test@read_all_entries: - fi-bsw-nick: [INCOMPLETE][1] ([i915#1250] / [i915#1436]) -> [PASS][2] [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8523/fi-bsw-nick/igt@debugfs_test@read_all_entries.html [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17755/fi-bsw-nick/igt@debugfs_test@read_all_entries.html [i915#1250]: https://gitlab.freedesktop.org/drm/intel/issues/1250 [i915#1436]: https://gitlab.freedesktop.org/drm/intel/issues/1436 Participating hosts (47 -> 42) ------------------------------ Missing (5): fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-byt-clapper fi-bdw-samus Build changes ------------- * Linux: CI_DRM_8523 -> Patchwork_17755 CI-20190529: 20190529 CI_DRM_8523: f96c380f22d4a7808efbab0fccee2e95a0dc10ad @ git://anongit.freedesktop.org/gfx-ci/linux IGT_5672: 4653b6464daf3403c22b8ce7d8e376d9ee6cb493 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools Patchwork_17755: e1781eb0d5c008c72d2024e723c8cfe4f1f940eb @ git://anongit.freedesktop.org/gfx-ci/linux == Linux commits == e1781eb0d5c0 drm/i915/gem: Avoid waiting inside mmu_notifier_invalidate_range == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17755/index.html _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 3+ messages in thread
* [Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915/gem: Avoid waiting inside mmu_notifier_invalidate_range 2020-05-22 3:01 [Intel-gfx] [PATCH] drm/i915/gem: Avoid waiting inside mmu_notifier_invalidate_range Chris Wilson 2020-05-22 4:07 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork @ 2020-05-22 22:49 ` Patchwork 1 sibling, 0 replies; 3+ messages in thread From: Patchwork @ 2020-05-22 22:49 UTC (permalink / raw) To: Chris Wilson; +Cc: intel-gfx == Series Details == Series: drm/i915/gem: Avoid waiting inside mmu_notifier_invalidate_range URL : https://patchwork.freedesktop.org/series/77529/ State : failure == Summary == CI Bug Log - changes from CI_DRM_8523_full -> Patchwork_17755_full ==================================================== Summary ------- **FAILURE** Serious unknown changes coming with Patchwork_17755_full absolutely need to be verified manually. If you think the reported changes have nothing to do with the changes introduced in Patchwork_17755_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_17755_full: ### IGT changes ### #### Possible regressions #### * igt@gem_userptr_blits@map-fixed-invalidate-busy-gup@uc: - shard-kbl: [PASS][1] -> [INCOMPLETE][2] [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8523/shard-kbl3/igt@gem_userptr_blits@map-fixed-invalidate-busy-gup@uc.html [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17755/shard-kbl1/igt@gem_userptr_blits@map-fixed-invalidate-busy-gup@uc.html * igt@gem_userptr_blits@map-fixed-invalidate-busy@wb: - shard-skl: [PASS][3] -> [INCOMPLETE][4] [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8523/shard-skl10/igt@gem_userptr_blits@map-fixed-invalidate-busy@wb.html [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17755/shard-skl8/igt@gem_userptr_blits@map-fixed-invalidate-busy@wb.html * igt@gem_userptr_blits@sync-unmap-cycles: - shard-skl: [PASS][5] -> [DMESG-FAIL][6] [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8523/shard-skl9/igt@gem_userptr_blits@sync-unmap-cycles.html [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17755/shard-skl5/igt@gem_userptr_blits@sync-unmap-cycles.html Known issues ------------ Here are the changes found in Patchwork_17755_full that come from known issues: ### IGT changes ### #### Issues hit #### * igt@i915_suspend@debugfs-reader: - shard-apl: [PASS][7] -> [DMESG-WARN][8] ([i915#180]) +1 similar issue [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8523/shard-apl6/igt@i915_suspend@debugfs-reader.html [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17755/shard-apl1/igt@i915_suspend@debugfs-reader.html * igt@kms_cursor_crc@pipe-a-cursor-256x85-offscreen: - shard-skl: [PASS][9] -> [FAIL][10] ([i915#54]) [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8523/shard-skl7/igt@kms_cursor_crc@pipe-a-cursor-256x85-offscreen.html [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17755/shard-skl2/igt@kms_cursor_crc@pipe-a-cursor-256x85-offscreen.html * igt@kms_cursor_crc@pipe-b-cursor-suspend: - shard-kbl: [PASS][11] -> [DMESG-WARN][12] ([i915#180]) [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8523/shard-kbl6/igt@kms_cursor_crc@pipe-b-cursor-suspend.html [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17755/shard-kbl2/igt@kms_cursor_crc@pipe-b-cursor-suspend.html * igt@kms_cursor_legacy@all-pipes-torture-bo: - shard-kbl: [PASS][13] -> [DMESG-WARN][14] ([i915#128]) [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8523/shard-kbl6/igt@kms_cursor_legacy@all-pipes-torture-bo.html [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17755/shard-kbl1/igt@kms_cursor_legacy@all-pipes-torture-bo.html * igt@kms_cursor_legacy@cursorb-vs-flipa-toggle: - shard-glk: [PASS][15] -> [DMESG-FAIL][16] ([i915#1186]) [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8523/shard-glk5/igt@kms_cursor_legacy@cursorb-vs-flipa-toggle.html [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17755/shard-glk7/igt@kms_cursor_legacy@cursorb-vs-flipa-toggle.html * igt@kms_flip_tiling@flip-changes-tiling: - shard-apl: [PASS][17] -> [FAIL][18] ([i915#95]) [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8523/shard-apl2/igt@kms_flip_tiling@flip-changes-tiling.html [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17755/shard-apl7/igt@kms_flip_tiling@flip-changes-tiling.html - shard-kbl: [PASS][19] -> [FAIL][20] ([i915#699] / [i915#93] / [i915#95]) [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8523/shard-kbl1/igt@kms_flip_tiling@flip-changes-tiling.html [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17755/shard-kbl2/igt@kms_flip_tiling@flip-changes-tiling.html * igt@kms_frontbuffer_tracking@psr-rgb101010-draw-render: - shard-skl: [PASS][21] -> [FAIL][22] ([i915#49]) [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8523/shard-skl7/igt@kms_frontbuffer_tracking@psr-rgb101010-draw-render.html [22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17755/shard-skl2/igt@kms_frontbuffer_tracking@psr-rgb101010-draw-render.html * igt@kms_hdr@bpc-switch: - shard-skl: [PASS][23] -> [FAIL][24] ([i915#1188]) [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8523/shard-skl7/igt@kms_hdr@bpc-switch.html [24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17755/shard-skl5/igt@kms_hdr@bpc-switch.html * igt@kms_plane_alpha_blend@pipe-c-coverage-7efc: - shard-skl: [PASS][25] -> [FAIL][26] ([fdo#108145] / [i915#265]) [25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8523/shard-skl5/igt@kms_plane_alpha_blend@pipe-c-coverage-7efc.html [26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17755/shard-skl6/igt@kms_plane_alpha_blend@pipe-c-coverage-7efc.html * igt@kms_psr@psr2_sprite_plane_move: - shard-iclb: [PASS][27] -> [SKIP][28] ([fdo#109441]) +2 similar issues [27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8523/shard-iclb2/igt@kms_psr@psr2_sprite_plane_move.html [28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17755/shard-iclb1/igt@kms_psr@psr2_sprite_plane_move.html #### Possible fixes #### * {igt@gem_exec_balancer@bonded-true-hang}: - shard-tglb: [TIMEOUT][29] -> [PASS][30] [29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8523/shard-tglb8/igt@gem_exec_balancer@bonded-true-hang.html [30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17755/shard-tglb3/igt@gem_exec_balancer@bonded-true-hang.html * igt@i915_pm_dc@dc6-psr: - shard-skl: [FAIL][31] ([i915#454]) -> [PASS][32] [31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8523/shard-skl3/igt@i915_pm_dc@dc6-psr.html [32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17755/shard-skl4/igt@i915_pm_dc@dc6-psr.html * igt@kms_cursor_legacy@2x-long-flip-vs-cursor-atomic: - shard-glk: [FAIL][33] ([i915#72]) -> [PASS][34] [33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8523/shard-glk1/igt@kms_cursor_legacy@2x-long-flip-vs-cursor-atomic.html [34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17755/shard-glk6/igt@kms_cursor_legacy@2x-long-flip-vs-cursor-atomic.html * {igt@kms_flip@flip-vs-expired-vblank@b-dp1}: - shard-kbl: [FAIL][35] ([i915#79]) -> [PASS][36] [35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8523/shard-kbl4/igt@kms_flip@flip-vs-expired-vblank@b-dp1.html [36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17755/shard-kbl6/igt@kms_flip@flip-vs-expired-vblank@b-dp1.html * {igt@kms_flip@flip-vs-suspend-interruptible@a-dp1}: - shard-kbl: [DMESG-WARN][37] ([i915#180]) -> [PASS][38] +7 similar issues [37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8523/shard-kbl6/igt@kms_flip@flip-vs-suspend-interruptible@a-dp1.html [38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17755/shard-kbl1/igt@kms_flip@flip-vs-suspend-interruptible@a-dp1.html * {igt@kms_flip@flip-vs-suspend@a-dp1}: - shard-apl: [DMESG-WARN][39] ([i915#180]) -> [PASS][40] +1 similar issue [39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8523/shard-apl1/igt@kms_flip@flip-vs-suspend@a-dp1.html [40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17755/shard-apl2/igt@kms_flip@flip-vs-suspend@a-dp1.html * igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes: - shard-kbl: [FAIL][41] ([fdo#103375]) -> [PASS][42] [41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8523/shard-kbl1/igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes.html [42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17755/shard-kbl4/igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes.html * igt@kms_plane_alpha_blend@pipe-c-constant-alpha-min: - shard-skl: [FAIL][43] ([fdo#108145] / [i915#265]) -> [PASS][44] [43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8523/shard-skl5/igt@kms_plane_alpha_blend@pipe-c-constant-alpha-min.html [44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17755/shard-skl6/igt@kms_plane_alpha_blend@pipe-c-constant-alpha-min.html * igt@kms_psr@psr2_cursor_mmap_cpu: - shard-iclb: [SKIP][45] ([fdo#109441]) -> [PASS][46] +2 similar issues [45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8523/shard-iclb8/igt@kms_psr@psr2_cursor_mmap_cpu.html [46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17755/shard-iclb2/igt@kms_psr@psr2_cursor_mmap_cpu.html * igt@kms_vblank@pipe-a-ts-continuation-suspend: - shard-apl: [DMESG-WARN][47] ([i915#180] / [i915#95]) -> [PASS][48] [47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8523/shard-apl4/igt@kms_vblank@pipe-a-ts-continuation-suspend.html [48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17755/shard-apl4/igt@kms_vblank@pipe-a-ts-continuation-suspend.html {name}: This element is suppressed. This means it is ignored when computing the status of the difference (SUCCESS, WARNING, or FAILURE). [fdo#103375]: https://bugs.freedesktop.org/show_bug.cgi?id=103375 [fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145 [fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441 [i915#1186]: https://gitlab.freedesktop.org/drm/intel/issues/1186 [i915#1188]: https://gitlab.freedesktop.org/drm/intel/issues/1188 [i915#128]: https://gitlab.freedesktop.org/drm/intel/issues/128 [i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180 [i915#265]: https://gitlab.freedesktop.org/drm/intel/issues/265 [i915#454]: https://gitlab.freedesktop.org/drm/intel/issues/454 [i915#49]: https://gitlab.freedesktop.org/drm/intel/issues/49 [i915#54]: https://gitlab.freedesktop.org/drm/intel/issues/54 [i915#699]: https://gitlab.freedesktop.org/drm/intel/issues/699 [i915#72]: https://gitlab.freedesktop.org/drm/intel/issues/72 [i915#79]: https://gitlab.freedesktop.org/drm/intel/issues/79 [i915#93]: https://gitlab.freedesktop.org/drm/intel/issues/93 [i915#95]: https://gitlab.freedesktop.org/drm/intel/issues/95 Participating hosts (11 -> 11) ------------------------------ No changes in participating hosts Build changes ------------- * Linux: CI_DRM_8523 -> Patchwork_17755 CI-20190529: 20190529 CI_DRM_8523: f96c380f22d4a7808efbab0fccee2e95a0dc10ad @ git://anongit.freedesktop.org/gfx-ci/linux IGT_5672: 4653b6464daf3403c22b8ce7d8e376d9ee6cb493 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools Patchwork_17755: e1781eb0d5c008c72d2024e723c8cfe4f1f940eb @ 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_17755/index.html _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-05-22 22:49 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2020-05-22 3:01 [Intel-gfx] [PATCH] drm/i915/gem: Avoid waiting inside mmu_notifier_invalidate_range Chris Wilson 2020-05-22 4:07 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork 2020-05-22 22:49 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
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).