]> Gentwo Git Trees - linux/.git/commit
drm/xe/migrate: make MI_TLB_INVALIDATE conditional
authorMatthew Auld <matthew.auld@intel.com>
Fri, 8 Aug 2025 11:04:53 +0000 (12:04 +0100)
committerMatthew Auld <matthew.auld@intel.com>
Thu, 28 Aug 2025 08:58:19 +0000 (09:58 +0100)
commit81a45cb7ea31a59777af294de590eea66ab80691
tree0c4462680ad5fc6e1e2d590cbfa376ce6931cee6
parentdb16f9d90c1d97a2b5483b4b856625875bffe860
drm/xe/migrate: make MI_TLB_INVALIDATE conditional

When clearing VRAM we should be able to skip invalidating the TLBs if we
are only using the identity map to access VRAM (which is the common
case), since no modifications are made to PTEs on the fly. Also since we
use huge 1G entries within the identity map, there should be a pretty
decent chance that the next packet(s) (if also clears) can avoid a tree
walk if we don't shoot down the TLBs, like if we have to process a long
stream of clears.

For normal moves/copies, we usually always end up with the src or dst
being system memory, meaning we can't only rely on the identity map and
will also need to emit PTEs and so will always require a TLB flush.

v2:
  - Update commit to explain the situation for normal copies (Matt B)
  - Rebase on latest changes

Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Link: https://lore.kernel.org/r/20250808110452.467513-2-matthew.auld@intel.com
drivers/gpu/drm/xe/xe_migrate.c
drivers/gpu/drm/xe/xe_ring_ops.c