svm_range_c...e_pagetables(9)
π svm_range_cpu_invalidate_pagetables(9) β NAME
okay so bestie, welcome to the svm_range_cpu_invalidate_pagetables page, straight out of the Kernel API Manual (section 9, kernel-space, very demure, very mindful). the header up top literally reads svm_range_c...e_pagetables(9) because even man pages get a little truncated sometimes, slay.
svm_range_cpu_invalidate_pagetables β interval notifier callback π
like, that's it, that's the whole NAME section. she's an interval notifier callback. main character energy fr fr.
β¨ SYNOPSIS β¨
bool svm_range_cpu_invalidate_pagetables (struct mmu_interval_notifier
* mni , const struct mmu_notifier_range *range , unsigned long cur_seq );
she returns a bool, she takes three args, and no, you cannot skip any of them. all three or nothing, periodt. π«Ά
π¦ ARGUMENTS π¦
mniβ themmu_interval_notifierstruct. that's your notifier bestie herself πrangeβ themmu_notifier_rangestruct. the range in question, iconic β¨cur_seqβ the value to pass tommu_interval_set_seq. she's a sequence number and she's booked and busy π₯
πΈ DESCRIPTION πΈ
so here's the tea. if the event is MMU_NOTIFY_UNMAP, that means this is coming from a CPU unmap range. otherwise? it's coming from migration, or from the CPU page invalidation callback. iykyk. π
for the unmap event: you unmap the range from the GPUs, you remove the prange from svms in a delayed work thread, and you split the prange if only part of the prange is unmapped. not me doing three things at once π
for the invalidation event: it depends on whether GPU retry fault is enabled, and this is the part you cannot sleep on:
- if GPU retry fault is not enabled β evict the queues, then schedule
svm_range_restore_workto update the GPU mapping and resume the queues. like a whole lil pipeline, we love to see it π - if GPU retry fault is enabled β unmap the svm range from the GPU, and retry fault will update the GPU mapping to recover. she heals herself, honestly obsessed π§
π CONTEXT π
big mood, pay attention: the mmap lock and the notifier_invalidate_start lock are held for the invalidate event, and the prange lock is held if this is from migration.
bestie please internalize which locks are held when. this is not a drill, this is a lock context note. π
β SEE ALSO β
the whole friend group, no cap β all of these live in the Kernel file ./drivers/gpu/drm/amd/amdkfd/kfd_svm.c:
svm_range_unlink(9)svm_range_add_to_svms(9)svm_range_debug_dump(9)svm_range_split_adjust(9)svm_range_split(9)svm_range_list_lock_and_flush_work(9)svm_range_evict(9)svm_range_add(9)svm_range_from_addr(9)svm_range_check_vm(9)svm_range_is_valid(9)svm_range_best_prefetch_location(9)
go read them, they're all icons too, i don't make the rules πβ¨
π«Ά SIGN-OFF π«Ά
and that's the page!! sourced from ./drivers/gpu/drm/amd/amdkfd, dated October 2026 β mwah, drink water, and don't forget which locks you're holding. bye 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