ksm_disable_merge_any(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ksm_disable_merge_any(9) β€” the Kernel API Manual moment

okay so bestie, welcome to the ksm_disable_merge_any page from the Kernel API Manual ✨ this one's short and sweet and it's literally the "undo" button for merge mode, so let's get into it 🫢


🌸 NAME 🌸

ksm_disable_merge_any β€” turns merging off for all the compatible VMA's of the mm, the ones you previously switched on with ksm_enable_merge_any(). no cap, it's the reverse of that whole situation πŸ’«


✨ SYNOPSIS ✨

int ksm_disable_merge_any (struct mm_struct *mm );

πŸŽ€ ARGUMENTS πŸŽ€

  • mm β€” pointer to mm. that's it. that's the whole argument. she's lowkey simple πŸ’–

πŸ¦‹ DESCRIPTION πŸ¦‹

so like, disabling merging implies unmerging any pages that are currently merged β€” think of it as the same energy as setting MADV_UNMERGEABLE would have πŸ‘‘ it's not just flipping a flag, she actually goes in and undoes the merges.

⚠️ and here's the part you can't skip: if the unmerging fails, the whole operation fails, and merging on all compatible VMA's remains enabled. so no half-and-half situation, it's all or nothing bestie πŸ’€

Returns 0 on success, otherwise an error code. periodt 🌈


🧚 SEE ALSO 🧚

go read all of those too, iykyk πŸ“šπŸ’…


and that's the page!! this iconic little number lives in ./mm, dated October 2026 β€” mwah, stan a kernel doc that keeps it short πŸ’œπŸŽ€

slay, you're now a ksm_disable_merge_any expert πŸ’–

πŸ“¦ where this page comes from