1 What: /sys/devices/system/memory
3 Contact: Badari Pulavarty <pbadari@us.ibm.com>
5 The /sys/devices/system/memory contains a snapshot of the
6 internal state of the kernel memory blocks. Files could be
7 added or removed dynamically to represent hot-add/remove
9 Users: hotplug memory add/remove tools
10 http://www.ibm.com/developerworks/wikis/display/LinuxP/powerpc-utils
12 What: /sys/devices/system/memory/memoryX/removable
14 Contact: Badari Pulavarty <pbadari@us.ibm.com>
16 The file /sys/devices/system/memory/memoryX/removable is a
17 legacy interface used to indicated whether a memory block is
18 likely to be offlineable or not. Newer kernel versions return
19 "1" if and only if the kernel supports memory offlining.
20 Users: hotplug memory remove tools
21 http://www.ibm.com/developerworks/wikis/display/LinuxP/powerpc-utils
22 lsmem/chmem part of util-linux
24 What: /sys/devices/system/memory/memoryX/phys_device
26 Contact: Badari Pulavarty <pbadari@us.ibm.com>
28 The file /sys/devices/system/memory/memoryX/phys_device
29 is read-only; it is a legacy interface only ever used on s390x
30 to expose the covered storage increment.
31 Users: Legacy s390-tools lsmem/chmem
33 What: /sys/devices/system/memory/memoryX/phys_index
35 Contact: Badari Pulavarty <pbadari@us.ibm.com>
37 The file /sys/devices/system/memory/memoryX/phys_index
38 is read-only and contains the section ID in hexadecimal
39 which is equivalent to decimal X contained in the
40 memory section directory name.
42 What: /sys/devices/system/memory/memoryX/state
44 Contact: Badari Pulavarty <pbadari@us.ibm.com>
46 The file /sys/devices/system/memory/memoryX/state
47 is read-write. When read, it returns the online/offline
48 state of the memory block. When written, root can toggle
49 the online/offline state of a memory block using the following
52 # echo online > /sys/devices/system/memory/memoryX/state
53 # echo offline > /sys/devices/system/memory/memoryX/state
55 On newer kernel versions, advanced states can be specified
56 when onlining to select a target zone: "online_movable"
57 selects the movable zone. "online_kernel" selects the
58 applicable kernel zone (DMA, DMA32, or Normal). However,
59 after successfully setting one of the advanced states,
60 reading the file will return "online"; the zone information
61 can be obtained via "valid_zones" instead.
63 While onlining is unlikely to fail, there are no guarantees
64 that offlining will succeed. Offlining is more likely to
65 succeed if "valid_zones" indicates "Movable".
66 Users: hotplug memory remove tools
67 http://www.ibm.com/developerworks/wikis/display/LinuxP/powerpc-utils
70 What: /sys/devices/system/memory/memoryX/valid_zones
72 Contact: Zhang Zhen <zhenzhang.zhang@huawei.com>
74 The file /sys/devices/system/memory/memoryX/valid_zones is
77 For online memory blocks, it returns in which zone memory
78 provided by a memory block is managed. If multiple zones
79 apply (not applicable for hotplugged memory), "None" is returned
80 and the memory block cannot be offlined.
82 For offline memory blocks, it returns by which zone memory
83 provided by a memory block can be managed when onlining.
84 The first returned zone ("default") will be used when setting
85 the state of an offline memory block to "online". Only one of
86 the kernel zones (DMA, DMA32, Normal) is applicable for a single
89 What: /sys/devices/system/memoryX/nodeY
91 Contact: Linux Memory Management list <linux-mm@kvack.org>
93 When CONFIG_NUMA is enabled, a symbolic link that
94 points to the corresponding NUMA node directory.
96 For example, the following symbolic link is created for
97 memory section 9 on node0:
99 /sys/devices/system/memory/memory9/node0 -> ../../node/node0
102 What: /sys/devices/system/node/nodeX/memoryY
104 Contact: Gary Hade <garyhade@us.ibm.com>
106 When CONFIG_NUMA is enabled
107 /sys/devices/system/node/nodeX/memoryY is a symbolic link that
108 points to the corresponding /sys/devices/system/memory/memoryY
109 memory section directory. For example, the following symbolic
110 link is created for memory section 9 on node0.
112 /sys/devices/system/node/node0/memory9 -> ../../memory/memory9
114 What: /sys/devices/system/memory/crash_hotplug
116 Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org>
118 (RO) indicates whether or not the kernel updates relevant kexec
119 segments on memory hot un/plug and/or on/offline events, avoiding the
120 need to reload kdump kernel.