hmm_range_fa...cked_timeout(9)
π 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 overtimeoutβ timeout in jiffies for internal-EBUSYretries, or0to 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
- 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