vmballoon_alloc_page_list(9)
π vmballoon_alloc_page_list(9) β the Kernel API Manual, bestie edition π
Okay so real talk, this is vmballoon_alloc_page_list, straight out of the Kernel API Manual (section 9, the fancy kernel-internals one π
). It's the little helper that goes out and grabs you a whole list of pages for the balloon driver. Let's get into it.
β¨ SYNOPSIS β¨
int vmballoon_alloc_page_list (struct vmballoon *b , struct
vmballoon_ctl *ctl , unsigned int req_n_pages );
That return type is int, no cap. π«Ά
πΈ ARGUMENTS πΈ
bβ pointer to the balloon. Yes, literally a balloon. It's thestruct vmballoon *and it's the main character here.ctlβ pointer for thestruct vmballoon_ctl, which defines the operation. It's the vibe-setter, it tells everyone what we're actually doing.req_n_pagesβ the number of requested pages. Anunsigned int, so, like, how many do you want bestie.
π¦ DESCRIPTION π¦
So what it does is: it tries to allocate req_n_pages. Then it adds them to the list of balloon pages in ctl.pages β and bestie it also updates ctl.n_pages to reflect the number of pages. Like it keeps the receipts in sync, love that for us. β¨
π RETURN π
Returns zero on success, or an error code otherwise. So 0 means slay, anything else means something went sideways. π
π SEE ALSO π
Kernel file ./drivers/misc/vmw_balloon.c and honestly the whole friend group:
enum vmballoon_cmd_type(9), struct vmballoon_batch_entry(9), vmballoon_send_guest_id(9), vmballoon_page_order(9), vmballoon_page_in_frames(9), vmballoon_mark_page_offline(9), vmballoon_mark_page_online(9), vmballoon_send_get_target(9), vmballoon_handle_one_result(9), vmballoon_status_page(9), vmballoon_lock_op(9), vmballoon_add_page(9), vmballoon_lock(9), vmballoon_release_page_list(9), vmballoon_change(9), vmballoon_enqueue_page_list(9), vmballoon_dequeue_page_list(9), vmballoon_split_refused_pages(9), vmballoon_inflate(9), vmballoon_deflate(9), vmballoon_deinit_batching(9), vmballoon_init_batching(9), vmballoon_vmci_init(9), vmballoon_pop(9), vmballoon_work(9), vmballoon_shrinker_scan(9), vmballoon_shrinker_count(9), vmballoon_debug_show(9), vmballoon_migratepage(9)
Sign-off time π β this little gem lives in <code>./drivers/misc</code>, and the page is dated October 2026. That's the whole footer, no gatekeeping. Go allocate some pages, bestie. π
π¦ 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