get_user_pages_fast_only(9)
π get_user_pages_fast_only β pin user pages in memory β¨
okay so bestie, this one lives in the Kernel API Manual (that's the get_user_pages_fast_only(9) corner of the world), and it's honestly kinda iconic. Let's get into it π«Ά
β¨ SYNOPSIS β¨
int get_user_pages_fast_only (unsigned long start , int nr_pages ,
unsigned int gup_flags , struct page **pages );
like, she takes four things and returns an int. slay π
π ARGUMENTS π
startβ the starting user address. where the whole thing begins, periodt πnr_pagesβ number of pages fromstartto pin. yes, that many πgup_flagsβ flags modifying pin behaviour. the little knobs that change how it acts β¨pagesβ the array that receives pointers to the pages pinned. should be at leastnr_pageslong. at least, bestie, don't come in here with a short array π
π DESCRIPTION π
So like β it's get_user_pages_fast but the IRQ-safe version, in that it won't fall back to the regular GUP. no backup plan, no fallback era, she stands on business π
If the architecture does not support this function, it simply returns with no pages pinned. like, nothing happened, no pages, we move on π¦
β οΈ Careful, careful! COW breaking can go either way, so a non-write access can get ambiguous page results. If you call this function without
(and yes, the original page literally trails off right there β "If you call this function without" and nothing else. that's not me skipping it, that's just the text, iykyk ππ so watch yourself and read the source.)
π SEE ALSO π
Kernel file ./mm/gup.c β plus this whole friend group:
try_grab_folio(9)unpin_user_page(9)unpin_folio(9)folio_add_pin(9)unpin_user_pages_dirty_lock(9)unpin_user_page_range_dirty_lock(9)unpin_user_pages(9)unpin_user_folio(9)unpin_folios(9)try_grab_folio_fast(9)follow_page_mask(9)__get_user_pages(9)fixup_user_fault(9)populate_vma_page_range(9)fault_in_writeable(9)fault_in_subpage_writeable(9)fault_in_readable(9)get_dump_page(9)get_user_pages_remote(9)get_user_pages(9)get_user_pages_fast(9)pin_user_pages_fast(9)pin_user_pages_remote(9)pin_user_pages(9)memfd_pin_folios(9)folio_add_pins(9)
and that's the whole page, bestie πΈ this lil entry comes from the source section ./mm and it's dated October 2026 β so mark your calendar, screenshot it, whatever, it's giving main character energy and it ate π
πβ¨π
π¦ 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