15c755e9fSBadari PulavartyWhat: /sys/devices/system/memory 25c755e9fSBadari PulavartyDate: June 2008 35c755e9fSBadari PulavartyContact: Badari Pulavarty <pbadari@us.ibm.com> 45c755e9fSBadari PulavartyDescription: 55c755e9fSBadari Pulavarty The /sys/devices/system/memory contains a snapshot of the 65c755e9fSBadari Pulavarty internal state of the kernel memory blocks. Files could be 75c755e9fSBadari Pulavarty added or removed dynamically to represent hot-add/remove 85c755e9fSBadari Pulavarty operations. 95c755e9fSBadari PulavartyUsers: hotplug memory add/remove tools 100ea6e611SJustin P. Mattock http://www.ibm.com/developerworks/wikis/display/LinuxP/powerpc-utils 115c755e9fSBadari Pulavarty 125c755e9fSBadari PulavartyWhat: /sys/devices/system/memory/memoryX/removable 135c755e9fSBadari PulavartyDate: June 2008 145c755e9fSBadari PulavartyContact: Badari Pulavarty <pbadari@us.ibm.com> 155c755e9fSBadari PulavartyDescription: 165c755e9fSBadari Pulavarty The file /sys/devices/system/memory/memoryX/removable 175c755e9fSBadari Pulavarty indicates whether this memory block is removable or not. 185c755e9fSBadari Pulavarty This is useful for a user-level agent to determine 195c755e9fSBadari Pulavarty identify removable sections of the memory before attempting 205c755e9fSBadari Pulavarty potentially expensive hot-remove memory operation 215c755e9fSBadari PulavartyUsers: hotplug memory remove tools 220ea6e611SJustin P. Mattock http://www.ibm.com/developerworks/wikis/display/LinuxP/powerpc-utils 23c04fc586SGary Hade 24c04fc586SGary HadeWhat: /sys/devices/system/memory/memoryX/phys_device 25c04fc586SGary HadeDate: September 2008 26c04fc586SGary HadeContact: Badari Pulavarty <pbadari@us.ibm.com> 27c04fc586SGary HadeDescription: 28c04fc586SGary Hade The file /sys/devices/system/memory/memoryX/phys_device 29c04fc586SGary Hade is read-only and is designed to show the name of physical 30c04fc586SGary Hade memory device. Implementation is currently incomplete. 31c04fc586SGary Hade 32c04fc586SGary HadeWhat: /sys/devices/system/memory/memoryX/phys_index 33c04fc586SGary HadeDate: September 2008 34c04fc586SGary HadeContact: Badari Pulavarty <pbadari@us.ibm.com> 35c04fc586SGary HadeDescription: 36c04fc586SGary Hade The file /sys/devices/system/memory/memoryX/phys_index 37c04fc586SGary Hade is read-only and contains the section ID in hexadecimal 38c04fc586SGary Hade which is equivalent to decimal X contained in the 39c04fc586SGary Hade memory section directory name. 40c04fc586SGary Hade 41c04fc586SGary HadeWhat: /sys/devices/system/memory/memoryX/state 42c04fc586SGary HadeDate: September 2008 43c04fc586SGary HadeContact: Badari Pulavarty <pbadari@us.ibm.com> 44c04fc586SGary HadeDescription: 45c04fc586SGary Hade The file /sys/devices/system/memory/memoryX/state 46a33f3224SFrancis Galiegue is read-write. When read, its contents show the 47c04fc586SGary Hade online/offline state of the memory section. When written, 48c04fc586SGary Hade root can toggle the the online/offline state of a removable 49c04fc586SGary Hade memory section (see removable file description above) 50c04fc586SGary Hade using the following commands. 51c04fc586SGary Hade # echo online > /sys/devices/system/memory/memoryX/state 52c04fc586SGary Hade # echo offline > /sys/devices/system/memory/memoryX/state 53c04fc586SGary Hade 54c04fc586SGary Hade For example, if /sys/devices/system/memory/memory22/removable 55c04fc586SGary Hade contains a value of 1 and 56c04fc586SGary Hade /sys/devices/system/memory/memory22/state contains the 57c04fc586SGary Hade string "online" the following command can be executed by 58c04fc586SGary Hade by root to offline that section. 59c04fc586SGary Hade # echo offline > /sys/devices/system/memory/memory22/state 60c04fc586SGary HadeUsers: hotplug memory remove tools 610ea6e611SJustin P. Mattock http://www.ibm.com/developerworks/wikis/display/LinuxP/powerpc-utils 62c04fc586SGary Hade 63dee5d0d5SAlex Chiang 64*ed2f2400SZhang ZhenWhat: /sys/devices/system/memory/memoryX/valid_zones 65*ed2f2400SZhang ZhenDate: July 2014 66*ed2f2400SZhang ZhenContact: Zhang Zhen <zhenzhang.zhang@huawei.com> 67*ed2f2400SZhang ZhenDescription: 68*ed2f2400SZhang Zhen The file /sys/devices/system/memory/memoryX/valid_zones is 69*ed2f2400SZhang Zhen read-only and is designed to show which zone this memory 70*ed2f2400SZhang Zhen block can be onlined to. 71*ed2f2400SZhang Zhen 72dee5d0d5SAlex ChiangWhat: /sys/devices/system/memoryX/nodeY 73dee5d0d5SAlex ChiangDate: October 2009 74dee5d0d5SAlex ChiangContact: Linux Memory Management list <linux-mm@kvack.org> 75dee5d0d5SAlex ChiangDescription: 76dee5d0d5SAlex Chiang When CONFIG_NUMA is enabled, a symbolic link that 77dee5d0d5SAlex Chiang points to the corresponding NUMA node directory. 78dee5d0d5SAlex Chiang 79dee5d0d5SAlex Chiang For example, the following symbolic link is created for 80dee5d0d5SAlex Chiang memory section 9 on node0: 81dee5d0d5SAlex Chiang /sys/devices/system/memory/memory9/node0 -> ../../node/node0 82dee5d0d5SAlex Chiang 83dee5d0d5SAlex Chiang 84c04fc586SGary HadeWhat: /sys/devices/system/node/nodeX/memoryY 85c04fc586SGary HadeDate: September 2008 86c04fc586SGary HadeContact: Gary Hade <garyhade@us.ibm.com> 87c04fc586SGary HadeDescription: 88c04fc586SGary Hade When CONFIG_NUMA is enabled 89c04fc586SGary Hade /sys/devices/system/node/nodeX/memoryY is a symbolic link that 90c04fc586SGary Hade points to the corresponding /sys/devices/system/memory/memoryY 91c04fc586SGary Hade memory section directory. For example, the following symbolic 92c04fc586SGary Hade link is created for memory section 9 on node0. 93c04fc586SGary Hade /sys/devices/system/node/node0/memory9 -> ../../memory/memory9 94