execbuf nowait pin vs userptr + shrinker
Recording this for my own misery,
<0>] __i915_active_wait+0x79/0xc0 [i915]
[<0>] i915_vma_unbind+0x23/0x120 [i915]
[<0>] i915_gem_object_unbind+0x17a/0x350 [i915]
[<0>] userptr_mn_invalidate_range_start+0xa7/0x170 [i915]
[<0>] __mmu_notifier_invalidate_range_start+0x110/0x150
[<0>] try_to_unmap_one+0x790/0x870
[<0>] rmap_walk_file+0xe9/0x230
[<0>] rmap_walk+0x27/0x30
[<0>] try_to_unmap+0x89/0xc0
[<0>] shrink_page_list+0x88a/0xf50
[<0>] shrink_inactive_list+0x137/0x2f0
[<0>] shrink_lruvec+0x4ec/0x5f0
[<0>] shrink_node+0x15d/0x410
[<0>] try_to_free_pages+0x17f/0x430
[<0>] __alloc_pages_slowpath+0x2ab/0xcc0
[<0>] __alloc_pages_nodemask+0x1ad/0x1e0
[<0>] new_slab+0x2d8/0x310
[<0>] ___slab_alloc.constprop.0+0x288/0x520
[<0>] __slab_alloc.constprop.0+0xd/0x20
[<0>] kmem_cache_alloc_trace+0x1ad/0x1c0
[<0>] alloc_pd+0x21/0x70 [i915]
[<0>] __gen8_ppgtt_alloc+0x335/0x3a0 [i915]
[<0>] __gen8_ppgtt_alloc+0x15d/0x3a0 [i915]
[<0>] gen8_ppgtt_alloc+0x84/0xe0 [i915]
[<0>] ppgtt_bind_vma+0x83/0xa0 [i915]
[<0>] __vma_bind+0x24/0x40 [i915]
[<0>] fence_work+0x1b/0x84 [i915]
[<0>] fence_notify+0x80/0x10c [i915]
[<0>] __i915_sw_fence_complete+0x2d/0x180 [i915]
[<0>] i915_sw_fence_complete+0x12/0x20 [i915]
[<0>] i915_sw_fence_commit+0x9/0x10 [i915]
[<0>] i915_vma_pin+0x2d1/0x790 [i915]
[<0>] i915_gem_do_execbuffer+0x966/0x28f0 [i915]
[<0>] i915_gem_execbuffer2_ioctl+0x1e6/0x3c0 [i915]
[<0>] drm_ioctl_kernel+0x85/0xd0
[<0>] drm_ioctl+0x1f6/0x378
[<0>] ksys_ioctl+0x6d/0xa0
[<0>] __x64_sys_ioctl+0x15/0x20
[<0>] do_syscall_64+0x46/0x190
[<0>] entry_SYSCALL_64_after_hwframe+0x44/0xa9
which says we hit page_reclaim during the nowait pin phase of execbuf but ended up waiting on a pinned buffer via the mmu_notifier trying to unmap a page.