From: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>
To: intel-xe@lists.freedesktop.org
Cc: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
"Christian König" <christian.koenig@amd.com>,
"Matthew Brost" <matthew.brost@intel.com>,
dri-devel@lists.freedesktop.org
Subject: [PATCH v6 0/2] drm/ttm: Really use a separate LRU list for swapped- and pinned objects
Date: Wed, 11 Sep 2024 14:18:57 +0200 [thread overview]
Message-ID: <20240911121859.85387-1-thomas.hellstrom@linux.intel.com> (raw)
Resources of swapped objects were never moved off their LRU list
when swapped, and also resources of pinned objects might remain on
their LRU list unless the driver moved them to the device pinned list
after pinning.
Rename the device "pinned" list to "unevictable" and ensure that resources
of objects that are pinned or swapped are moved to that list.
RFC: Should we instead of a device-wide unevictable list, introduce an
unevictable priority so that all objects remain with their resource's
respective manager?
Patch 1/2 deals with swapped objects and also handles the problem of
moving objects back to their manager's LRU list when populating.
Patch 2/2 deals with pinned objects.
v2:
- Address review comments by Christian König.
- Make TTM KUNIT tests build.
v3:
- Fix a couple of NULL pointer dereferences (Intel CI).
v4:
- Fix even more NULL pointer dereferences (Intel CI).
The bulk move handling appears pretty fragile...
v5:
- Fix resources created for readback of swapped bos
ending up on the unevictable list (Intel CI)
v6:
- Move a lockdep assert.
- Tabify a line.
Cc: Christian König <christian.koenig@amd.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: <dri-devel@lists.freedesktop.org>
Thomas Hellström (2):
drm/ttm: Move swapped objects off the manager's LRU list
drm/ttm: Move pinned objects off LRU lists when pinning
drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 2 +-
drivers/gpu/drm/i915/gem/i915_gem_ttm_move.c | 2 +-
drivers/gpu/drm/i915/gem/i915_gem_ttm_pm.c | 4 +-
drivers/gpu/drm/ttm/tests/ttm_bo_test.c | 4 +-
drivers/gpu/drm/ttm/tests/ttm_resource_test.c | 6 +-
drivers/gpu/drm/ttm/ttm_bo.c | 67 +++++++++++++++++--
drivers/gpu/drm/ttm/ttm_bo_util.c | 6 +-
drivers/gpu/drm/ttm/ttm_bo_vm.c | 2 +-
drivers/gpu/drm/ttm/ttm_device.c | 4 +-
drivers/gpu/drm/ttm/ttm_resource.c | 28 ++++++--
drivers/gpu/drm/ttm/ttm_tt.c | 3 +
drivers/gpu/drm/xe/xe_bo.c | 4 +-
include/drm/ttm/ttm_bo.h | 2 +
include/drm/ttm/ttm_device.h | 5 +-
include/drm/ttm/ttm_tt.h | 5 ++
15 files changed, 114 insertions(+), 30 deletions(-)
--
2.46.0
next reply other threads:[~2024-09-11 12:19 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-11 12:18 Thomas Hellström [this message]
2024-09-11 12:18 ` [PATCH v6 1/2] drm/ttm: Move swapped objects off the manager's LRU list Thomas Hellström
2024-09-11 12:18 ` [PATCH v6 2/2] drm/ttm: Move pinned objects off LRU lists when pinning Thomas Hellström
2024-09-11 12:26 ` ✓ CI.Patch_applied: success for drm/ttm: Really use a separate LRU list for swapped- and pinned objects (rev6) Patchwork
2024-09-11 12:26 ` ✓ CI.checkpatch: " Patchwork
2024-09-11 12:27 ` ✓ CI.KUnit: " Patchwork
2024-09-11 12:39 ` ✓ CI.Build: " Patchwork
2024-09-11 12:42 ` ✓ CI.Hooks: " Patchwork
2024-09-11 12:43 ` ✗ CI.checksparse: warning " Patchwork
2024-09-11 12:59 ` ✗ CI.BAT: failure " Patchwork
2024-09-11 13:32 ` Thomas Hellström
2024-09-11 14:13 ` ✗ CI.FULL: " Patchwork
2024-09-11 18:46 ` Thomas Hellström
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=20240911121859.85387-1-thomas.hellstrom@linux.intel.com \
--to=thomas.hellstrom@linux.intel.com \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.brost@intel.com \
/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;
as well as URLs for NNTP newsgroup(s).