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) 50*54a19b4dSMauro Carvalho Chehab using the following commands:: 51*54a19b4dSMauro Carvalho Chehab 52c04fc586SGary Hade # echo online > /sys/devices/system/memory/memoryX/state 53c04fc586SGary Hade # echo offline > /sys/devices/system/memory/memoryX/state 54c04fc586SGary Hade 55c04fc586SGary Hade For example, if /sys/devices/system/memory/memory22/removable 56c04fc586SGary Hade contains a value of 1 and 57c04fc586SGary Hade /sys/devices/system/memory/memory22/state contains the 58c04fc586SGary Hade string "online" the following command can be executed by 59*54a19b4dSMauro Carvalho Chehab by root to offline that section:: 60*54a19b4dSMauro Carvalho Chehab 61c04fc586SGary Hade # echo offline > /sys/devices/system/memory/memory22/state 62*54a19b4dSMauro Carvalho Chehab 63c04fc586SGary HadeUsers: hotplug memory remove tools 640ea6e611SJustin P. Mattock http://www.ibm.com/developerworks/wikis/display/LinuxP/powerpc-utils 65c04fc586SGary Hade 66dee5d0d5SAlex Chiang 67ed2f2400SZhang ZhenWhat: /sys/devices/system/memory/memoryX/valid_zones 68ed2f2400SZhang ZhenDate: July 2014 69ed2f2400SZhang ZhenContact: Zhang Zhen <zhenzhang.zhang@huawei.com> 70ed2f2400SZhang ZhenDescription: 71ed2f2400SZhang Zhen The file /sys/devices/system/memory/memoryX/valid_zones is 72ed2f2400SZhang Zhen read-only and is designed to show which zone this memory 73ed2f2400SZhang Zhen block can be onlined to. 74ed2f2400SZhang Zhen 75dee5d0d5SAlex ChiangWhat: /sys/devices/system/memoryX/nodeY 76dee5d0d5SAlex ChiangDate: October 2009 77dee5d0d5SAlex ChiangContact: Linux Memory Management list <linux-mm@kvack.org> 78dee5d0d5SAlex ChiangDescription: 79dee5d0d5SAlex Chiang When CONFIG_NUMA is enabled, a symbolic link that 80dee5d0d5SAlex Chiang points to the corresponding NUMA node directory. 81dee5d0d5SAlex Chiang 82dee5d0d5SAlex Chiang For example, the following symbolic link is created for 83dee5d0d5SAlex Chiang memory section 9 on node0: 84*54a19b4dSMauro Carvalho Chehab 85dee5d0d5SAlex Chiang /sys/devices/system/memory/memory9/node0 -> ../../node/node0 86dee5d0d5SAlex Chiang 87dee5d0d5SAlex Chiang 88c04fc586SGary HadeWhat: /sys/devices/system/node/nodeX/memoryY 89c04fc586SGary HadeDate: September 2008 90c04fc586SGary HadeContact: Gary Hade <garyhade@us.ibm.com> 91c04fc586SGary HadeDescription: 92c04fc586SGary Hade When CONFIG_NUMA is enabled 93c04fc586SGary Hade /sys/devices/system/node/nodeX/memoryY is a symbolic link that 94c04fc586SGary Hade points to the corresponding /sys/devices/system/memory/memoryY 95c04fc586SGary Hade memory section directory. For example, the following symbolic 96c04fc586SGary Hade link is created for memory section 9 on node0. 97*54a19b4dSMauro Carvalho Chehab 98c04fc586SGary Hade /sys/devices/system/node/node0/memory9 -> ../../memory/memory9 99