ksm_do_scan(9)
π ksm_do_scan(9) β the Kernel API Manual, bestie edition π
Okay so bestie, welcome to ksm_do_scan(9) from the Kernel API Manual β this is literally the page you want if you've ever wondered who's actually doing the scanning in KSM. Spoiler: it's this function. She's the main character of the scanner, no cap. π
β¨ NAME β¨
ksm_do_scan β the ksm scanner main worker function. That's it, that's the whole vibe: she's the one doing the work while everyone else is just standing around looking pretty. π
πΈ SYNOPSIS πΈ
void ksm_do_scan (unsigned int scan_npages );
Note the void β she returns nothing, she gives nothing back, she simply does. Queen behavior honestly. π
π¦ ARGUMENTS π¦
scan_npagesβ number of pages we want to scan before we return. Yep, that's the whole knob: you tell her how many pages to look at, and once she's hit that count she's out, she's done, she's returning to her caller. Budget your pages accordingly bestie, she's not staying late. β
π₯ SEE ALSO π₯
Like, go read the whole friend group, they're all linked:
- Kernel file
./mm/ksm.cOverview(9) struct ksm_mm_slot(9)struct ksm_scan(9)struct ksm_stable_node(9)struct ksm_rmap_item(9)struct advisor_ctx(9)replace_page(9)ksm_vma_flags(9)ksm_enable_merge_any(9)ksm_disable_merge_any(9)
Friendly reminder that every single one of those references is a real page, so if you're lost, click through β the lore is deep and honestly kind of iconic. π«Ά
β¨ and that's the page!! β¨ This little gem lives in the ./mm directory and this particular printing is dated October 2026 β so if you're reading it later, yeah, she's vintage, she's archival, she's history. π Mwah, love u, go scan some pages responsibly. πππ¦
π¦ 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