From: Matthew Auld <matthew.auld@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [Intel-gfx] [PATCH] drm/i915/selftests: add some vma_sync
Date: Mon, 23 Mar 2020 11:38:09 +0000 [thread overview]
Message-ID: <20200323113809.41452-1-matthew.auld@intel.com> (raw)
The subtest shrink_boom was added as a regression test for some missing
refcounting on the paging structures, however since the binding is
potentially async, setting the vm->fault_attr might apply to the purge
vma, and not the intended explode vma. Also it looks like it might also
be possible to hit some weird shrinker deadlock where the unbinding of
one vma allocates memory by flushing and waiting for its
still-pending-bind operation while holding vm->mutex, which will always
lands back in the shrinker since we set vm->fault_attr for the selftest.
References: https://gitlab.freedesktop.org/drm/intel/issues/1493
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
---
drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c b/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c
index b342bef5e7c9..029406a2a0b3 100644
--- a/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c
@@ -951,6 +951,8 @@ static int shrink_boom(struct i915_address_space *vm,
if (err)
goto err_purge;
+ i915_vma_sync(vma);
+
/* Should now be ripe for purging */
i915_vma_unpin(vma);
@@ -974,6 +976,8 @@ static int shrink_boom(struct i915_address_space *vm,
if (err)
goto err_explode;
+ i915_vma_sync(vma);
+
i915_vma_unpin(vma);
i915_gem_object_put(purge);
--
2.20.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next reply other threads:[~2020-03-23 11:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-23 11:38 Matthew Auld [this message]
2020-03-23 11:42 ` [Intel-gfx] [PATCH] drm/i915/selftests: add some vma_sync Chris Wilson
2020-03-23 13:12 ` Matthew Auld
2020-03-23 11:50 ` Chris Wilson
2020-03-23 13:59 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200323113809.41452-1-matthew.auld@intel.com \
--to=matthew.auld@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox