aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/memory-hotplug.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/memory-hotplug.txt')
-rw-r--r--Documentation/memory-hotplug.txt47
1 files changed, 31 insertions, 16 deletions
diff --git a/Documentation/memory-hotplug.txt b/Documentation/memory-hotplug.txt
index 57e7e9cc1870..8f485d72cf25 100644
--- a/Documentation/memory-hotplug.txt
+++ b/Documentation/memory-hotplug.txt
@@ -126,36 +126,51 @@ config options.
126-------------------------------- 126--------------------------------
1274 sysfs files for memory hotplug 1274 sysfs files for memory hotplug
128-------------------------------- 128--------------------------------
129All sections have their device information under /sys/devices/system/memory as 129All sections have their device information in sysfs. Each section is part of
130a memory block under /sys/devices/system/memory as
130 131
131/sys/devices/system/memory/memoryXXX 132/sys/devices/system/memory/memoryXXX
132(XXX is section id.) 133(XXX is the section id.)
133 134
134Now, XXX is defined as start_address_of_section / section_size. 135Now, XXX is defined as (start_address_of_section / section_size) of the first
136section contained in the memory block. The files 'phys_index' and
137'end_phys_index' under each directory report the beginning and end section id's
138for the memory block covered by the sysfs directory. It is expected that all
139memory sections in this range are present and no memory holes exist in the
140range. Currently there is no way to determine if there is a memory hole, but
141the existence of one should not affect the hotplug capabilities of the memory
142block.
135 143
136For example, assume 1GiB section size. A device for a memory starting at 144For example, assume 1GiB section size. A device for a memory starting at
1370x100000000 is /sys/device/system/memory/memory4 1450x100000000 is /sys/device/system/memory/memory4
138(0x100000000 / 1Gib = 4) 146(0x100000000 / 1Gib = 4)
139This device covers address range [0x100000000 ... 0x140000000) 147This device covers address range [0x100000000 ... 0x140000000)
140 148
141Under each section, you can see 4 files. 149Under each section, you can see 4 or 5 files, the end_phys_index file being
150a recent addition and not present on older kernels.
142 151
143/sys/devices/system/memory/memoryXXX/phys_index 152/sys/devices/system/memory/memoryXXX/start_phys_index
153/sys/devices/system/memory/memoryXXX/end_phys_index
144/sys/devices/system/memory/memoryXXX/phys_device 154/sys/devices/system/memory/memoryXXX/phys_device
145/sys/devices/system/memory/memoryXXX/state 155/sys/devices/system/memory/memoryXXX/state
146/sys/devices/system/memory/memoryXXX/removable 156/sys/devices/system/memory/memoryXXX/removable
147 157
148'phys_index' : read-only and contains section id, same as XXX. 158'phys_index' : read-only and contains section id of the first section
149'state' : read-write 159 in the memory block, same as XXX.
150 at read: contains online/offline state of memory. 160'end_phys_index' : read-only and contains section id of the last section
151 at write: user can specify "online", "offline" command 161 in the memory block.
152'phys_device': read-only: designed to show the name of physical memory device. 162'state' : read-write
153 This is not well implemented now. 163 at read: contains online/offline state of memory.
154'removable' : read-only: contains an integer value indicating 164 at write: user can specify "online", "offline" command
155 whether the memory section is removable or not 165 which will be performed on al sections in the block.
156 removable. A value of 1 indicates that the memory 166'phys_device' : read-only: designed to show the name of physical memory
157 section is removable and a value of 0 indicates that 167 device. This is not well implemented now.
158 it is not removable. 168'removable' : read-only: contains an integer value indicating
169 whether the memory block is removable or not
170 removable. A value of 1 indicates that the memory
171 block is removable and a value of 0 indicates that
172 it is not removable. A memory block is removable only if
173 every section in the block is removable.
159 174
160NOTE: 175NOTE:
161 These directories/files appear after physical memory hotplug phase. 176 These directories/files appear after physical memory hotplug phase.