0001 What: /sys/devices/system/memory
0002 Date: June 2008
0003 Contact: Badari Pulavarty <pbadari@us.ibm.com>
0004 Description:
0005 The /sys/devices/system/memory contains a snapshot of the
0006 internal state of the kernel memory blocks. Files could be
0007 added or removed dynamically to represent hot-add/remove
0008 operations.
0009 Users: hotplug memory add/remove tools
0010 http://www.ibm.com/developerworks/wikis/display/LinuxP/powerpc-utils
0011
0012 What: /sys/devices/system/memory/memoryX/removable
0013 Date: June 2008
0014 Contact: Badari Pulavarty <pbadari@us.ibm.com>
0015 Description:
0016 The file /sys/devices/system/memory/memoryX/removable is a
0017 legacy interface used to indicated whether a memory block is
0018 likely to be offlineable or not. Newer kernel versions return
0019 "1" if and only if the kernel supports memory offlining.
0020 Users: hotplug memory remove tools
0021 http://www.ibm.com/developerworks/wikis/display/LinuxP/powerpc-utils
0022 lsmem/chmem part of util-linux
0023
0024 What: /sys/devices/system/memory/memoryX/phys_device
0025 Date: September 2008
0026 Contact: Badari Pulavarty <pbadari@us.ibm.com>
0027 Description:
0028 The file /sys/devices/system/memory/memoryX/phys_device
0029 is read-only; it is a legacy interface only ever used on s390x
0030 to expose the covered storage increment.
0031 Users: Legacy s390-tools lsmem/chmem
0032
0033 What: /sys/devices/system/memory/memoryX/phys_index
0034 Date: September 2008
0035 Contact: Badari Pulavarty <pbadari@us.ibm.com>
0036 Description:
0037 The file /sys/devices/system/memory/memoryX/phys_index
0038 is read-only and contains the section ID in hexadecimal
0039 which is equivalent to decimal X contained in the
0040 memory section directory name.
0041
0042 What: /sys/devices/system/memory/memoryX/state
0043 Date: September 2008
0044 Contact: Badari Pulavarty <pbadari@us.ibm.com>
0045 Description:
0046 The file /sys/devices/system/memory/memoryX/state
0047 is read-write. When read, it returns the online/offline
0048 state of the memory block. When written, root can toggle
0049 the online/offline state of a memory block using the following
0050 commands::
0051
0052 # echo online > /sys/devices/system/memory/memoryX/state
0053 # echo offline > /sys/devices/system/memory/memoryX/state
0054
0055 On newer kernel versions, advanced states can be specified
0056 when onlining to select a target zone: "online_movable"
0057 selects the movable zone. "online_kernel" selects the
0058 applicable kernel zone (DMA, DMA32, or Normal). However,
0059 after successfully setting one of the advanced states,
0060 reading the file will return "online"; the zone information
0061 can be obtained via "valid_zones" instead.
0062
0063 While onlining is unlikely to fail, there are no guarantees
0064 that offlining will succeed. Offlining is more likely to
0065 succeed if "valid_zones" indicates "Movable".
0066 Users: hotplug memory remove tools
0067 http://www.ibm.com/developerworks/wikis/display/LinuxP/powerpc-utils
0068
0069
0070 What: /sys/devices/system/memory/memoryX/valid_zones
0071 Date: July 2014
0072 Contact: Zhang Zhen <zhenzhang.zhang@huawei.com>
0073 Description:
0074 The file /sys/devices/system/memory/memoryX/valid_zones is
0075 read-only.
0076
0077 For online memory blocks, it returns in which zone memory
0078 provided by a memory block is managed. If multiple zones
0079 apply (not applicable for hotplugged memory), "None" is returned
0080 and the memory block cannot be offlined.
0081
0082 For offline memory blocks, it returns by which zone memory
0083 provided by a memory block can be managed when onlining.
0084 The first returned zone ("default") will be used when setting
0085 the state of an offline memory block to "online". Only one of
0086 the kernel zones (DMA, DMA32, Normal) is applicable for a single
0087 memory block.
0088
0089 What: /sys/devices/system/memoryX/nodeY
0090 Date: October 2009
0091 Contact: Linux Memory Management list <linux-mm@kvack.org>
0092 Description:
0093 When CONFIG_NUMA is enabled, a symbolic link that
0094 points to the corresponding NUMA node directory.
0095
0096 For example, the following symbolic link is created for
0097 memory section 9 on node0:
0098
0099 /sys/devices/system/memory/memory9/node0 -> ../../node/node0
0100
0101
0102 What: /sys/devices/system/node/nodeX/memoryY
0103 Date: September 2008
0104 Contact: Gary Hade <garyhade@us.ibm.com>
0105 Description:
0106 When CONFIG_NUMA is enabled
0107 /sys/devices/system/node/nodeX/memoryY is a symbolic link that
0108 points to the corresponding /sys/devices/system/memory/memoryY
0109 memory section directory. For example, the following symbolic
0110 link is created for memory section 9 on node0.
0111
0112 /sys/devices/system/node/node0/memory9 -> ../../memory/memory9