kgd2kfd_vmfault_fast_path(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… kgd2kfd_vmfault_fast_path(9)

okay so bestie, welcome to the Kernel API Manual ✨ this one is a little function with a big name and honestly it's giving "I only do cardio" energy β€” it's the fast path for KFD vm page fault interrupt handling for gmc v9, and it's lowkey the bouncer at the club deciding whether your fault gets waved through or has to wait in line πŸŽ€


✨ NAME ✨

kgd2kfd_vmfault_fast_path β€” KFD vm page fault interrupt handling fast path for gmc v9 πŸ¦‹

🌸 SYNOPSIS 🌸

bool kgd2kfd_vmfault_fast_path (struct amdgpu_device *adev , struct
       amdgpu_iv_entry *entry , bool retry_fault );

πŸ’– ARGUMENTS πŸ’–

  • adev β€” the amdgpu device, the main character of this whole situation πŸ‘‘
  • entry β€” the vm fault interrupt vector, aka the receipt for the fault 🧾
  • retry_fault β€” whether this is a retry fault, yes/no, simple as 🫢

🌈 DESCRIPTION 🌈

okay so buckle up, this is the whole flow map and I'm not skipping a single step, periodt πŸ’…

retry fault β€” with CAM enabled, here's the pipeline bestie:

adev primary ring |  gmc_v9_0_process_interrupt

adev soft_ring |  gmc_v9_0_process_interrupt worker failed to recover page fault

KFD node ih_fifo |  KFD interrupt_wq worker kfd_signal_vm_fault_event

without CAM, it's a slightly different route (and yes, the typo is canon, don't come for me πŸ™ˆ):

adev primary ring1 |  gmc_v9_0_process_interrupt worker failed to recvoer page fault

KFD node ih_fifo |  KFD interrupt_wq worker kfd_signal_vm_fault_event

no-retry fault β€” much chiller, no recovery drama:

adev primary ring |  gmc_v9_0_process_interrupt

KFD node ih_fifo |  KFD interrupt_wq worker kfd_signal_vm_fault_event

fast path β€” so here's the iconic part ✨ after kfd_signal_vm_fault_event, gmc_v9_0_process_interrupt drops the page fault of the same process and doesn't copy the interrupt to KFD node ih_fifo. Like, we already handled it, we're not doing it twice, we're not answering the same text twice πŸ“΅

⚠️ but heads up: with the gdb debugger enabled, you gotta convert the retry fault to a no-retry fault for the debugger β€” so you cannot use the fast path in that case. the vibes are simply not compatible 😭

⭐ RETURN ⭐

  • true β€” use the fast path to handle this fault, slay, we're done here πŸ”₯
  • false β€” use the normal path to handle it, take the scenic route bestie πŸšΆβ€β™€οΈ

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./drivers/gpu/drm/amd/amdkfd/kfd_device.c β€” go read it, iykyk πŸ“–


kk that's the whole page, no notes πŸ’œ this little gem lives in ./drivers/gpu/drm/amd/amdkfd, it's from the October 2026 era, and it's brought to you by the Kernel API Manual β€” mwah, go fix some page faults bestie πŸ’…πŸŽ€πŸŒΈ

πŸ“¦ where this page comes from