intel-xe.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/2] drm/ttm: Really use a separate LRU list for swapped- and pinned objects
@ 2024-09-04  7:08 Thomas Hellström
  2024-09-04  7:08 ` [PATCH v4 1/2] drm/ttm: Move swapped objects off the manager's LRU list Thomas Hellström
                   ` (9 more replies)
  0 siblings, 10 replies; 19+ messages in thread
From: Thomas Hellström @ 2024-09-04  7:08 UTC (permalink / raw)
  To: intel-xe
  Cc: Thomas Hellström, Christian König, Matthew Brost,
	dri-devel

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...

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            | 15 +++--
 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, 101 insertions(+), 30 deletions(-)

-- 
2.46.0


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2024-10-09 12:37 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-04  7:08 [PATCH v4 0/2] drm/ttm: Really use a separate LRU list for swapped- and pinned objects Thomas Hellström
2024-09-04  7:08 ` [PATCH v4 1/2] drm/ttm: Move swapped objects off the manager's LRU list Thomas Hellström
2024-09-04  8:50   ` Christian König
2024-09-04  8:54     ` Thomas Hellström
2024-09-04 10:47       ` Christian König
2024-09-12 13:40         ` Thomas Hellström
2024-09-19 15:24           ` RESEND " Thomas Hellström
2024-10-02 11:44             ` Thomas Hellström
2024-10-07  8:54               ` Christian König
2024-10-09 12:37                 ` Thomas Hellström
2024-09-04  7:08 ` [PATCH v4 2/2] drm/ttm: Move pinned objects off LRU lists when pinning Thomas Hellström
2024-09-04  7:13 ` ✓ CI.Patch_applied: success for drm/ttm: Really use a separate LRU list for swapped- and pinned objects (rev4) Patchwork
2024-09-04  7:14 ` ✗ CI.checkpatch: warning " Patchwork
2024-09-04  7:15 ` ✓ CI.KUnit: success " Patchwork
2024-09-04  7:27 ` ✓ CI.Build: " Patchwork
2024-09-04  7:31 ` ✓ CI.Hooks: " Patchwork
2024-09-04  7:33 ` ✗ CI.checksparse: warning " Patchwork
2024-09-04  7:59 ` ✓ CI.BAT: success " Patchwork
2024-09-04  9:20 ` ✗ CI.FULL: 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).