NAME
ksm - kernel samepage merging (KSM) information
SYNOPSIS
ksm [-v] [[-p] address ...]
DESCRIPTION
This command displays information about all KSM pages currently
in use. For each KSM page, the display includes its stable_node
address, its page struct address, its physical address, the TGID/PID
for each task that is using the page, the number of mappings in the
task's address space for the page, and the mm_struct address of the
task. If pid is '-', the task has exited and the ksm page has not
been removed.
-v also dump each virtual address in a PID's virtual address
space that maps the KSM page.
address restricts the output to the KSM data associated with a
stable_node address, a page's physical address, or a page
pointer.
-p specifies that the address argument is a physical address,
for architectures that require it.
EXAMPLE
Display information about all KSM pages:
crash> ksm
PAGE: ffffea000451f180
STABLE_NODE: ffff88004866b6c0
PHYSICAL ADDRESS: 1147c6000
PID: 1318 MAPPINGS: 7707 MM: ffff88007f8abe80
PID: 1297 MAPPINGS: 4965 MM: ffff88007f8aa580
PAGE: ffffea0003413c40
STABLE_NODE: ffff880117bfbfc0
PHYSICAL ADDRESS: d04f1000
PID: 1297 MAPPINGS: 1 MM: ffff88007f8aa580
PID: 1318 MAPPINGS: 1 MM: ffff88007f8abe80
PAGE: ffffea00021e9880
STABLE_NODE: ffff880054ee1f30
PHYSICAL ADDRESS: 87a62000
PID: 1297 MAPPINGS: 2 MM: ffff88007f8aa580
...
Display all information about the KSM page whose physical
address is 0xffffea000168cd00:
crash> ksm -v ffffea000168cd00
PAGE: ffffea000168cd00
STABLE_NODE: ffff88007153ce10
PHYSICAL ADDRESS: 5a334000
PID: 1297 MAPPINGS: 4 MM: ffff88007f8aa580
VIRTUAL:
7f8cb91f9000
7f8cb8f28000
7f8cb7abf000
7f8cb79c7000
PID: 1318 MAPPINGS: 4 MM: ffff88007f8abe80
VIRTUAL:
7f7ca0703000
7f7c9f15e000
7f7c9ef8f000
7f7c9e96b000