Skip to content

nouveau/vmm: fix switching between small and large PTEs (series v2)

Dave Airlie dri-devel nouveau 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3nouveau/vmm: rewrite pte tracker using a struct and bitfields.drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.h+31 -240 replies
2/3nouveau/vmm: increase size of vmm pte tracker struct to u32 (v2)drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.h+8 -70 replies
3/3nouveau/vmm: start tracking if the LPT PTE is valid. (v6)drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.h+33 -90 replies

Reviews trailers per patch

None of the 3 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchMary GuillemardMel Henning
SeriesR-b T-b T-b
1/3
2/3
3/3

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

Read the v1 thread

Cover letter [PATCH 0/3] nouveau/vmm: fix switching between small and large PTEs (series v2)

[This is a repost with a fix for a bug noticed in patch 2 from yesterday.]

The nouveau page table has dual page tables with special states for tracking small vs large pages at the bottom level. However the current code isn't designed with the higher level large page support in mind.

The nouveau_uvmm/gpuvm code can cause unrefs to get delayed, so things like ref SPT, map SPT, unmap SPT, ref LPT, map LPT, unref SPT can happen.

unrefs can end up quite delayed and it shouldn't matter as unref should just affect reference counts.

However at least the SPT unref path was overwriting the LPT value when all SPT were unreffed even if an LPT was referenced in between.

This series refactors the code to use a union, then increases the size as I think even with the current code there was enough ref counts for SPTE. The last patch adds LPTE tracking.

Dave.