kfd_mem_dmaunmap_sg_bo(9)
Okay bestie, welcome to the Kernel API Manual page for kfd_mem_dmaunmap_sg_bo(9) β yes, the function name is right there in the title, and this is its whole vibe. π
πΈ NAME πΈ
kfd_mem_dmaunmap_sg_bo β Free DMA mapped sg_table of DOORBELL or MMIO BO. Periodt. π
β¨ SYNOPSIS β¨
void kfd_mem_dmaunmap_sg_bo (struct kgd_mem *mem , struct
kfd_mem_attachment *attachment );
π ARGUMENTS π
memβ SG BO of the DOORBELL or MMIO resource on the owning device. That's the BO in question, bestie.attachmentβ Virtual address attachment of the BO on accessing device. It's the attachment doing the accessing-device thing. π¦
π DESCRIPTION π
Okay so this method performs the following steps, and yes, there are literally two:
- Signal TTM to mark memory pointed to by BO as GPU inaccessible β TTM gets the signal, the memory gets marked inaccessible to the GPU. Slay.
- Free SG Table that is used to encapsulate DMA mapped memory of peer device's DOORBELL or MMIO memory β the SG Table gets freed, because it was encapsulating that DMA mapped peer-device DOORBELL or MMIO memory. Iconic cleanup behavior. π§
This method is invoked in the following contexts:
- UNMapping of DOORBELL or MMIO BO on a device having access to its memory
- Eviction of DOOREBELL or MMIO BO on device having access to its memory
Yes, DOOREBELL β that's exactly what the page says, and we are not fixing it, we are respecting it. π
π RETURN π
void β no return value, bestie. It does the thing and exits the chat. π
π SEE ALSO π
Kernel file ./drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c, plus the whole friend group:
reuse_dmamap(9)amdgpu_amdkfd_reserve_mem_limit(9)create_dmamap_sg_bo(9)amdgpu_amdkfd_remove_all_eviction_fences(9)create_sg_table(9)kfd_mem_dmamap_sg_bo(9)reserve_bo_and_vm(9)reserve_bo_and_cond_vms(9)unreserve_bo_and_vms(9)amdgpu_amdkfd_gpuvm_pin_bo(9)amdgpu_amdkfd_gpuvm_unpin_bo(9)amdgpu_amdkfd_map_gtt_bo_to_gart(9)
π That's the whole page! Footer cuteness: the source/version vibes point at ./drivers/gpu/drm/amd/amdgpu, the date is October 2026, and the page is kfd_mem_dmaunmap_sg_bo(9). Bye bestie, go unmap those sg BOs πβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms