kgd2kfd_vmfault_fast_path(9)
π 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
- 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