PAT and cache coherency support
Get series with b4
b4 am ZUtv1eH5uiHl3j9N@tmistat-deskVersions newest first
- v9 Latest0 of 3 patches 9 repliesIn review
Patches in v9 No applies recorded yet
None of the 3 patches the cover letter announces are in this archive.
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v9 yet.
Cover letter [Intel-xe] FW: [PATCH v9 0/3] PAT and cache coherency support
[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected] Bcc:
Subject: Re: [Intel-xe] [PATCH v9 0/3] PAT and cache coherency support
Reply-To:
In-Reply-To: <[email protected]>
Quoted 39 lines · Matthew Auld
Branch available here:
https://gitlab.freedesktop.org/mwa/kernel/-/tree/xe-pat-index?ref_type=headsIGT changes:
https://patchwork.freedesktop.org/series/124667/Mesa:
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25462Goal here is to allow userspace to directly control the
pat_indexwhen mapping memory via the ppGTT, in addtion to the CPU caching mode. This is very much needed on newer igpu platforms which allow incoherent GT access, where the choice over the cache level and expected coherency is best left to userspace depending on their usecase. In the future there may also be other stuff encoded in thepat_index, so giving userspace direct control will also be needed there.To support this we added new
gem_createuAPI for selecting the CPU cache mode to use for system memory, including the expected GPU coherency mode. There are various restrictions here for the selected coherency mode and compatible CPU cache modes. With that in place the actualpat_indexcan now be provided as part ofvm_bind. The only restriction is that the coherency mode of thepat_indexmust be at least as coherent as thegem_createcoherency mode. There are also some special cases like with userptr and dma-buf.v2:
- Loads of improvements/tweaks. Main changes are to now allow gem_create.coh_mode <=coh_mode(pat_index), rather than it needing to match exactly. This simplifies the dma-buf policy from userspace pov. Also we now only considerCOH_NONEandCOH_AT_LEAST_1WAY.
v3:
- Rebase. Split thepte_encode()refactoring, plus various smaller tweaks and fixes.
v4:
- Rebase on Lucas' new series.
- Drop UC cache mode.
- s/smem_cpu_caching/cpu_caching/. Idea is to make VRAM WC explicit in the uapi, plus make it more future proof.
v5:
- Rebase, plus some small tweaks and fixes.
Quoted 12 lines
v6:
- CI hooks fixes + checkpatch.
v7:
- Some small tweaks
v8:
- Rebase on Xe2 PAT table additions.
v9:
- Dropcoh_mode.Signature · 1 line
2.41.0
I'm sharing down here questions passed by [email protected] lets continue review here at respective ML
Sent: Wednesday, November 8, 2023 09:05
Subject: RE: [Intel-xe] [PATCH v9 0/3] PAT and cache coherency support
Just to confirm my understanding. We will have 2 separate APIs?
1. For gem_create to explicitly set coherency/caching according to API enums
2. For vm_bind to set PAT index that is aligned with Bspec and controls more than #1. It can also override coherency/caching that was previously set?