From: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>
To: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Cc: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>
Subject: [Intel-gfx] [PATCH 0/2] Protect vma destruction with the object lock
Date: Mon, 4 Jul 2022 15:52:47 +0200 [thread overview]
Message-ID: <20220704135249.8241-1-thomas.hellstrom@linux.intel.com> (raw)
Protecting vma destruction with the object lock is already
implemented everywhere as part of the "Remove short-term pinning" work,
except in the vm destructor where the reasoning was that most code that
needs to keep vmas alive also holds a vm reference.
However this complicates lifetime rules for vmas, so take the
object lock around vma destruction also in the vm destructor, trying
first with trylock to avoid having to unnecessarily release and
re-take the vm mutex that protects the vma lists.
As a follow up remove the now unnecessary taking of the vm reference in
i915_gem_object_unbind(), and the "BARRIER" retry when taking that
reference fails.
Thomas Hellström (2):
drm/i915: Take the object lock when destroying vmas from vm
destruction
drm/i915/gem: Rework i915_gem_object_unbind to rely on the object lock
drivers/gpu/drm/i915/gem/i915_gem_domain.c | 4 +---
drivers/gpu/drm/i915/gt/intel_gtt.c | 17 +++++++++++++++++
drivers/gpu/drm/i915/i915_drv.h | 7 +++----
drivers/gpu/drm/i915/i915_gem.c | 18 ------------------
4 files changed, 21 insertions(+), 25 deletions(-)
--
2.36.1
WARNING: multiple messages have this Message-ID (diff)
From: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>
To: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Cc: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>
Subject: [PATCH 0/2] Protect vma destruction with the object lock
Date: Mon, 4 Jul 2022 15:52:47 +0200 [thread overview]
Message-ID: <20220704135249.8241-1-thomas.hellstrom@linux.intel.com> (raw)
Protecting vma destruction with the object lock is already
implemented everywhere as part of the "Remove short-term pinning" work,
except in the vm destructor where the reasoning was that most code that
needs to keep vmas alive also holds a vm reference.
However this complicates lifetime rules for vmas, so take the
object lock around vma destruction also in the vm destructor, trying
first with trylock to avoid having to unnecessarily release and
re-take the vm mutex that protects the vma lists.
As a follow up remove the now unnecessary taking of the vm reference in
i915_gem_object_unbind(), and the "BARRIER" retry when taking that
reference fails.
Thomas Hellström (2):
drm/i915: Take the object lock when destroying vmas from vm
destruction
drm/i915/gem: Rework i915_gem_object_unbind to rely on the object lock
drivers/gpu/drm/i915/gem/i915_gem_domain.c | 4 +---
drivers/gpu/drm/i915/gt/intel_gtt.c | 17 +++++++++++++++++
drivers/gpu/drm/i915/i915_drv.h | 7 +++----
drivers/gpu/drm/i915/i915_gem.c | 18 ------------------
4 files changed, 21 insertions(+), 25 deletions(-)
--
2.36.1
next reply other threads:[~2022-07-04 16:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-04 13:52 Thomas Hellström [this message]
2022-07-04 13:52 ` [PATCH 0/2] Protect vma destruction with the object lock Thomas Hellström
2022-07-04 13:52 ` [Intel-gfx] [PATCH 1/2] drm/i915: Take the object lock when destroying vmas from vm destruction Thomas Hellström
2022-07-04 13:52 ` Thomas Hellström
2022-07-04 13:52 ` [Intel-gfx] [PATCH 2/2] drm/i915/gem: Rework i915_gem_object_unbind to rely on the object lock Thomas Hellström
2022-07-04 13:52 ` Thomas Hellström
2022-07-04 20:28 ` [Intel-gfx] ✓ Fi.CI.BAT: success for Protect vma destruction with " Patchwork
2022-07-05 1:53 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " 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=20220704135249.8241-1-thomas.hellstrom@linux.intel.com \
--to=thomas.hellstrom@linux.intel.com \
--cc=dri-devel@lists.freedesktop.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.