trace_ksm_merge_one_page(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ trace_ksm_merge_one_page(9) β€” a Kernel API Manual moment ✨

Okay bestie, so we're in the Kernel API Manual today (yes, the (9) section, we're being fancy) and the star of the show is trace_ksm_merge_one_page β€” the little tracepoint that fires called after a page has been merged. She's the after-party, not the party. πŸ’…


πŸŽ€ NAME

trace_ksm_merge_one_page β€” called after a page has been merged

Like, literally that's her whole job. She shows up after the merge goes down and is like "hey, it happened." Iconic behaviour, no notes. ✨


πŸ¦‹ SYNOPSIS

void trace_ksm_merge_one_page (unsigned long pfn , void *rmap_item ,
       void *mm , int err );

Returns void, so she gives you nothing back except vibes and possibly a trace event. That's the deal. 🫢


🌸 ARGUMENTS

  • pfn β€” page frame number of ksm page πŸ’– (yes, the actual page, the main character of the memory world)
  • rmap_item β€” address of rmap_item object (a void *, so she's mysterious, she contains multitudes ✨)
  • mm β€” address of the process mm struct 🌈 (the whole memory-map situation of the process in question)
  • err β€” success 😭 (it's an int, and its label is literally just "success", which is such a mood β€” we love a straightforward queen)

πŸ”₯ DESCRIPTION

So the way that this works: she allows you to trace the ksm merging of individual pages. That's it. That's the whole description. Individual pages, individually traced, one merge at a time. Not me being obsessed with per-page granularity, but also lowkey yes I am. πŸ‘‘


⭐ SEE ALSO

Kernel file ./include/trace/events/ksm.h, plus the whole KSM tracepoint friend group β€” she does not travel alone, bestie:

Fr fr, go read them all, they're giving lore. πŸ“šπŸ’œ


ngl she's a tracepoint, so she's not out here doing the merging herself β€” she just tells you about it afterward. Don't @ me, that's literally what "called after a page has been merged" means. πŸ™ˆ

Aaand that's the page! This little gem lives in ./include/trace/events and it's dated October 2026, so mark your calendars, besties πŸ—“οΈπŸ’–. Bye, love you, go trace some pages. πŸ¦‹πŸŽ€βœ¨

πŸ“¦ where this page comes from