drbd_alloc_pages(9)
π drbd_alloc_pages π
okay so this is a page from the Kernel API Manual (section 9, yes, the kernel-API girlies) and honestly? it's a whole mood. buckle up bestie π
β¨ NAME β¨
drbd_alloc_pages β Returns @number pages, and it will retry forever (or until it gets signalled, whichever comes first π). no cap, it's stubborn like that.
πΈ SYNOPSIS πΈ
struct page * drbd_alloc_pages (struct drbd_peer_device *peer_device ,
unsigned int number , bool retry );
π¦ ARGUMENTS π¦
peer_deviceβ the DRBD device. your main character π«Άnumberβ number of pages requested. literally how many pages we're asking for.retryβ whether to retry, if not enough pages are available right now. yes/no on the "try again" energy π
β DESCRIPTION β
So what it does is: it tries to allocate number pages. first it goes shopping in our own page pool, and then it hits up the kernel for the rest. and if that's still not enough, it can possibly retry until DRBD frees sufficient pages somewhere else β because sometimes the vibe check is "come back later" πβ¨
If this allocation would exceed the max_buffers setting, we throttle allocation (schedule_timeout) to give the system some room to breathe. literally just telling it to inhale, hold, exhale π§ββοΈ
and now the serious part bestie, pay attention: we do not usemax-buffersas a hard limit. why? because it could lead to congestion and further to a distributed deadlock during online-verify or (checksum based) resync, if themax-buffers, socket buffer sizes andresync-ratesettings are mis-configured. so likeβ¦ please don't mis-configure those. deadlock is not the aesthetic ππ₯
Returns a page chain linked via page->private. cute little linked list, we love to see it π
π SEE ALSO π
Kernel file ./drivers/block/drbd/drbd_receiver.c β that's where the lore lives π¦
that's the whole thing babes, no notes π
from ./drivers/block/drbd, dated October 2026 β mwah, go read the source, it's giving iconic ππβ
π¦ 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