Skip to content

drm/ttm: Really use a separate LRU list for swapped- and pinned objects

Thomas Hellström dri-devel intel-xe 6 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest2 patches 2 repliesIn review
  2. v52 patches 0 repliesSuperseded
  3. v42 patches 8 repliesSuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v32 patches0 repliesSuperseded
v22 patches0 repliesSuperseded
v12 patches3 repliesSuperseded

Changes in v6 from the cover letter

- Move a lockdep assert.
- Tabify a line.

Patches in v6 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2drm/ttm: Move swapped objects off the manager's LRU listdrivers/gpu/drm/i915/gem/i915_gem_ttm.c drivers/gpu/drm/i915/gem/i915_gem_ttm_move.c drivers/gpu/drm/i915/gem/i915_gem_ttm_pm.c +12 more+109 -270 replies
2/2drm/ttm: Move pinned objects off LRU lists when pinningdrivers/gpu/drm/ttm/ttm_bo.c+5 -30 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchChristian König
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v6 thread

Cover letter [PATCH v6 0/2] drm/ttm: Really use a separate LRU list for swapped- and pinned objects

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 <[email protected]>
Cc Matthew Brost <[email protected]>

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(-)
Signature · 1 line
2.46.0