hmm_range_fa...cked_timeout(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… hmm_range_fault_unlocked_timeout β€” Kernel API Manual ✨

okay bestie, welcome to the hmm_range_fault_unlocked_timeout(9) page, straight out of the Kernel API Manual 🫢 this one's a function, she faults in a whole range, and she has a retry timeout, and honestly? iconic behavior. let's get into it πŸ’–


🌸 NAME 🌸

hmm_range_fault_unlocked_timeout β€” fault in a range with a retry timeout ⏰


✨ SYNOPSIS ✨

int hmm_range_fault_unlocked_timeout (struct hmm_range *range , unsigned
long timeout );

so she takes a range and a timeout, returns an int, that's the whole vibe πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • range β€” argument structure πŸ¦‹ like, the actual range thing you're handing over
  • timeout β€” timeout in jiffies for internal -EBUSY retries, or 0 to retry indefinitely πŸ”

πŸ’– DESCRIPTION πŸ’–

okay so first thing's first, and this is a big one: the caller must not hold the mmap lock 🚨 not me emphasizing this β€” it's literally the rule. the function takes the mmap read lock internally, all by herself, and she allows handle_mm_fault to drop it during faults. main character energy fr fr πŸ‘‘

and if the mmap lock gets dropped, or the range gets invalidated? she doesn't panic, she just refreshes range->notifier_seq and restarts the walk internally. like a queen resetting her crown and going again 😌✨

now about that timeout β€” passing 0 for timeout retries indefinitely, periodt πŸ”. a non-zero timeout is a caller policy limit for repeated mmu-notifier invalidation retries. and listen, lowkey important detail: HMM does not interrupt page fault handling when the timeout expires 😭 it just returns -EBUSY if the retry budget is exhausted before a stable range is obtained. that's the whole deal.

returns 0 on success, or one of the error codes documented for hmm_range_fault πŸ’€ and -EINTR is returned if mmap_lock acquisition is interrupted or a fatal signal is pending during retry handling 🫢

bestie please remember: no mmap lock held by you, she handles that herself. it's giving "I got this" πŸ’…

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./mm/hmm.c 🌈 and her whole friend group:


and that's the page, bestie πŸŽ€ sign-off time: this little gem lives in the source ./mm, dated October 2026, and yeah β€” hmm_range_fault_unlocked_timeout(9), we love her, no cap πŸ’œβ­πŸ“

πŸ“¦ where this page comes from