1. Userspace: malloc(4 to 8. GPU shader:

1. Userspace: malloc(4 to 8. GPU shader: An architecture diagram generated by Archify. 1. Userspace: malloc(4 · MB) → virtual addr 0x7f... (pages not alloca… · Architecture component 1. Userspace: malloc(4 MB) → virtual addr 0x7f... (pages not alloca… 2. First touch: · page fault allocates 1024 × 4 KB pages scatt… · Architecture component 2. First touch: page fault allocates 1024 × 4 KB pages scatt… 3. pin_user_pages() · Lock pages in RAM (prevent swap/migration) · Architecture component 3. pin_user_pages() Lock pages in RAM (prevent swap/migration) 4. sg_alloc_table_from_pag… · Build scatter-gather list 1024 entries · Architecture component 4. sg_alloc_table_from_pag… Build scatter-gather list 1024 entries 5. dma_map_sg() · IOMMU: allocates contiguous IOVA (0xAAAA0000… · Architecture component 5. dma_map_sg() IOMMU: allocates contiguous IOVA (0xAAAA0000… 6. amdgpu_gart_bind() · Write IOVA/PA entries into GART table in VRAM · Architecture component 6. amdgpu_gart_bind() Write IOVA/PA entries into GART table in VRAM 7. amdgpu_vm_bo_update() · Update GPU page table: GPU VA 0x1000 → GART … · Architecture component 7. amdgpu_vm_bo_update() Update GPU page table: GPU VA 0x1000 → GART … 8. GPU shader: · load [0x1000] GPU TLB: GPU VA → GART → IOVA … · Architecture component 8. GPU shader: load [0x1000] GPU TLB: GPU VA → GART → IOVA … Legend Frontend Backend External

Chain

  • • 8 steps, one path
  • • Edge labels omitted for clarity