Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Auld <matthew.auld@intel.com>
To: Sanjay Yadav <sanjay.kumar.yadav@intel.com>,
	intel-xe@lists.freedesktop.org
Subject: Re: [PATCH v6] drm/xe/migrate: Revamp PAT index selection for migrate PTEs
Date: Tue, 14 Jul 2026 11:40:15 +0100	[thread overview]
Message-ID: <bd276e22-10b7-4bdb-9703-5f3047dd0ae6@intel.com> (raw)
In-Reply-To: <20260710083004.1546599-2-sanjay.kumar.yadav@intel.com>

On 10/07/2026 09:30, Sanjay Yadav wrote:
> Improve PAT index selection logic in xe_migrate.c to avoid unnecessary
> coherency overhead when host-side memory is uncached. Previously,
> we defaulted to XE_CACHE_WB, which enforces 2-way coherency and may
> trigger cacheline pulls from CPU even when host-side memory is never
> dirty.
> 
> This change introduces xe_migrate_pat_index() to choose the appropriate
> PAT index based on the actual TTM caching mode of the buffer object
> being mapped. For iGPUs with WC host mappings, we now prefer
> XE_CACHE_NONE to skip coherency snoops. For compressed PTEs on newer
> platforms, we select XE_CACHE_NONE_COMPRESSION.
> 
> This avoids unnecessary cache traffic for uncached host mappings.
> 
> v6: (sashiko)
> - Only apply the BO's host-side caching for system-memory PTEs.
> 
> v5: (Matt A)
> - Simplify emit_pte() to derive caching from res->bo directly, removing
>    the separate bo parameter
> - Leave changes in __xe_migrate_update_pgtables() and
>    build_pt_update_batch_sram()
> - Fix comment about page-walker coherency in xe_migrate_pat_index()
> 
> v4:
> - Keep xe_migrate_prepare_vm() on XE_CACHE_WB since page tables require
>    page-walker coherency.
> - Pass BO into emit_pte() and select PAT attributes from the BO's TTM
>    caching mode.
> 
> Assisted-by: GitHub Copilot:claude-opus-4.8
> Signed-off-by: Sanjay Yadav <sanjay.kumar.yadav@intel.com>
> Suggested-by: Matthew Auld <matthew.auld@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>

      parent reply	other threads:[~2026-07-14 10:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-10  8:30 [PATCH v6] drm/xe/migrate: Revamp PAT index selection for migrate PTEs Sanjay Yadav
2026-07-10  8:38 ` ✗ CI.checkpatch: warning for drm/xe/migrate: Revamp PAT index selection for migrate PTEs (rev6) Patchwork
2026-07-10  8:40 ` ✓ CI.KUnit: success " Patchwork
2026-07-10  9:21 ` ✓ Xe.CI.BAT: " Patchwork
2026-07-10 17:30 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-07-14 10:40 ` Matthew Auld [this message]

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=bd276e22-10b7-4bdb-9703-5f3047dd0ae6@intel.com \
    --to=matthew.auld@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=sanjay.kumar.yadav@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