swap_dup_entries_cluster(9)
swap_dup_entries_cluster(9) π β¨
okay so bestie, welcome to the Kernel API Manual corner of the group chat π«Ά todayβs main character is swap_dup_entries_cluster(9) β and yes, itβs giving βincrease the swap count of slots within one clusterβ energy, literally exactly that. no cap. π
πΈ NAME πΈ
swap_dup_entries_cluster β Increase the swap count of slots within one cluster.
β¨ SYNOPSIS β¨
int swap_dup_entries_cluster (struct swap_info_struct *si , pgoff_t offset , int nr );
thatβs the signature, character for character, so copy it exactly and donβt come for me πβ¨
π ARGUMENTS π
siβ The swap device. the actual swap device in question, okay?offsetβ start offset of slots.nrβ number of slots.
π¦ CONTEXT π¦
vibe check: the specified slots must be pinned by an existing swap count or a swap cache reference, so they wonβt be released until this helper returns. like, they are held in place for the whole ride, fr fr π«Ά
π₯ RETURN π₯
0β on success. slay.-ENOMEMβ if the swap count maxed out (SWP_TB_COUNT_MAX) and failed to allocate an extended table.-EINVALβ if any entry is bad entry.
π SEE ALSO π
Kernel file ./mm/swapfile.c and the whole crew:
swap_put_entries_cluster(9)folio_alloc_swap(9)folio_dup_swap(9)folio_put_swap(9)swap_entry_swapped(9)folio_free_swap(9)swap_put_entries_direct(9)swap_alloc_hibernation_slot(9)swap_free_hibernation_slot(9)pin_hibernation_swap_type(9)unpin_hibernation_swap_type(9)find_hibernation_swap_type(9)
okay thatβs the whole page, bestie!! big kiss from the ./mm source/version, dated October 2026 β mwah πππ«Ά
π¦ 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