trace_ksm_merge_one_page(9)
β¨ 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 ofrmap_itemobject (avoid *, 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 anint, 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:
trace_ksm_start_scan(9)trace_ksm_stop_scan(9)trace_ksm_enter(9)trace_ksm_exit(9)trace_ksm_merge_with_ksm_page(9)trace_ksm_remove_ksm_page(9)trace_ksm_remove_rmap_item(9)trace_ksm_advisor(9)
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
- 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