STRUCT KSM_SCAN(9)
β¨ struct ksm_scan(9) β¨
okay bestie, welcome to the Kernel API Manual π this one's a little struct called ksm_scan and honestly? it's giving main character energy for the whole scan loop. let's get into it π
πΈ NAME πΈ
struct ksm_scan β literally just a cursor for scanning π±οΈβ¨
π¦ SYNOPSIS π¦
struct ksm_scan {
struct ksm_mm_slot *mm_slot;
unsigned long address;
struct ksm_rmap_item **rmap_list;
unsigned long seqnr;
};
π Members π
mm_slotβ the currentmm_slotwe are scanning, like the one we're on rn πaddressβ the next address inside that to be scanned, i.e. where we're headed next πΊοΈrmap_listβ link to the next rmap to be scanned in thermap_list, the whole chain sitch πseqnrβ count of completed full scans (needed when removing unstable node) π’ no cap, this one matters when unstable nodes are getting yeeted
β Description β
There is only the one ksm_scan instance of this cursor structure. one. single. icon. π not a crowd, not a collection, just the one, periodt π
π SEE ALSO π
- Kernel file
./mm/ksm.cOverview(9) struct ksm_mm_slot(9)struct ksm_stable_node(9)struct ksm_rmap_item(9)struct advisor_ctx(9)replace_page(9)ksm_do_scan(9)ksm_vma_flags(9)ksm_enable_merge_any(9)ksm_disable_merge_any(9)
go read them, they're all iconique π«Ά
π and that's the whole page bestie, no filler, no gatekeeping, every member accounted for β¨
okay so this lives in ./mm, and it's stamped October 2026 β so mark your calendars fr fr ποΈπ love u, bye! π§ββοΈπΈ
π¦ 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