block_size_bytes: The size of each memory section (in hex) memoryXXXX: Each directory contains individual information about that memory section. The number associated with the memory section is arbitrary, and should not be used for any calculations, it is a useless tag. memoryXXXX/phys_index: multiply this by block_size_bytes and you can calculate the starting physical address of this memory section. This is so that you can directly correlate the memoryXXXX directory with any probe that you've issued. probe: The user may write a physical address into this file to initate a hot-addition of a new memory section. echo 0x00000000 > /sys/devices/system/memory/probe memory_probe_store() add_memory() __add_pages() __add_section() allocate section memmap lock zone register_new_memory() add_memory_block() register_memory() create kobject -> generates hotplug event sysfs create files() unlock zone /sbin/hotplug sees "ADD" event, calls: #!/bin/sh # goes in /etc/hotplug.d/memory/onlinenow.hotplug if [ "$ACTION" != "add" ]; then exit 0; fi while ! [ -f $SYSFS/$DEVPATH/state ]; do sleep 0.1; done echo online > "$SYSFS/$DEVPATH/state" store_mem_state() memory_block_change_state() memory_block_action() |------>online_pages() | online_page() | __free_page() \------>remove_memory() __remove_pages() capture_page_range() unregister_memory_section() -> generates unplug event