rds_page_remainder_alloc(9)
π NAME π
rds_page_remainder_alloc β bestie, this one's all about building up regions of a message β¨
πΈ SYNOPSIS πΈ
int rds_page_remainder_alloc (struct scatterlist *scat , unsigned long
bytes , gfp_t gfp );
π¦ ARGUMENTS π¦
scatβ the scatter list for the message, okurrr π that's the thing getting filled up.bytesβ literally the number of bytes needed. that's it, that's the whole vibe.gfpβ the waiting behaviour of the allocation. yes ma'am, this decides how patient we're being π
π DESCRIPTION π
okay so first thing, gfp is always ored with __GFP_HIGHMEM β no exceptions, no cap. so callers must be prepared to kmap the pages, etc. π
if bytes is at least a full page then this literally just returns a page from alloc_page. simple. iconic. done. β¨
but if bytes is a partial page then it gets interesting β this stores the unused region of the page in a per-cpu structure, and future partial-page allocations may be satisfied from that cached region π§ββοΈ so cute, so efficient. this lets us waste less memory on small allocations with minimal complexity, which is honestly the whole slay of it.
and the reason it works? the transmit path passes read-only page regions down to devices, and they hold a page reference until they're done with the region. periodt. π
π₯ SEE ALSO π₯
- Kernel file
./net/rds/page.cβ go read it, iykyk π«Ά
and that's the whole page bestie!! brought to you by ./net/rds, dated October 2026, for rds_page_remainder_alloc(9) β mwah, go touch some pages π
π¦ 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