diff options
| author | Matthew Auld <matthew.auld@intel.com> | 2026-07-23 17:15:43 +0100 |
|---|---|---|
| committer | Matthew Auld <matthew.auld@intel.com> | 2026-07-27 11:41:01 +0100 |
| commit | 05649458e4bc2e45eb8d231a7a9b00dd6c9e8206 (patch) | |
| tree | 813aa35e5fc2b80cafdcd31874dc2233bfcb80b4 /tools/perf/scripts/python/bin/task-analyzer-record | |
| parent | a1e4e62ebc799ce69236054672253e0086bf409b (diff) | |
drm/xe/bo: optimise TT population for DONTNEED BOs
When a VRAM buffer object is marked as DONTNEED, like in Mesa, the
driver skips migrating its contents to system memory and instead purges
the backing store during eviction (via xe_ttm_bo_purge).
However, xe_evict_flags() still returns tt_placement (XE_PL_TT) for VRAM
BOs even if they were marked DONTNEED. This causes
ttm_bo_handle_move_mem() to always call ttm_bo_populate() to allocate
destination system pages, only for those pages to be immediately freed
right after when xe_bo_move() calls xe_ttm_bo_purge().
Fix this by changing xe_evict_flags() to return sys_placement
(XE_PL_SYSTEM) for DONTNEED BOs. This causes TTM to skip the population
step while still ensuring that TTM calls xe_bo_move(), so
xe_ttm_bo_purge() still triggers.
v2 (Thomas):
- Add a comment to highlight why sys_placement over purge_placement.
Assisted-by: Copilot:gemini-3.1-pro-preview
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Maarten Lankhorst <dev@lankhorst.se>
Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Link: https://patch.msgid.link/20260723161542.1220276-2-matthew.auld@intel.com
Diffstat (limited to 'tools/perf/scripts/python/bin/task-analyzer-record')
0 files changed, 0 insertions, 0 deletions
