swap_dup_entries_cluster(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

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:


okay that’s the whole page, bestie!! big kiss from the ./mm source/version, dated October 2026 β€” mwah πŸ’–πŸŽ€πŸ«Ά

πŸ“¦ where this page comes from