18c2ecf20Sopenharmony_ciWhat: /sys/devices/system/memory 28c2ecf20Sopenharmony_ciDate: June 2008 38c2ecf20Sopenharmony_ciContact: Badari Pulavarty <pbadari@us.ibm.com> 48c2ecf20Sopenharmony_ciDescription: 58c2ecf20Sopenharmony_ci The /sys/devices/system/memory contains a snapshot of the 68c2ecf20Sopenharmony_ci internal state of the kernel memory blocks. Files could be 78c2ecf20Sopenharmony_ci added or removed dynamically to represent hot-add/remove 88c2ecf20Sopenharmony_ci operations. 98c2ecf20Sopenharmony_ciUsers: hotplug memory add/remove tools 108c2ecf20Sopenharmony_ci http://www.ibm.com/developerworks/wikis/display/LinuxP/powerpc-utils 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ciWhat: /sys/devices/system/memory/memoryX/removable 138c2ecf20Sopenharmony_ciDate: June 2008 148c2ecf20Sopenharmony_ciContact: Badari Pulavarty <pbadari@us.ibm.com> 158c2ecf20Sopenharmony_ciDescription: 168c2ecf20Sopenharmony_ci The file /sys/devices/system/memory/memoryX/removable 178c2ecf20Sopenharmony_ci indicates whether this memory block is removable or not. 188c2ecf20Sopenharmony_ci This is useful for a user-level agent to determine 198c2ecf20Sopenharmony_ci identify removable sections of the memory before attempting 208c2ecf20Sopenharmony_ci potentially expensive hot-remove memory operation 218c2ecf20Sopenharmony_ciUsers: hotplug memory remove tools 228c2ecf20Sopenharmony_ci http://www.ibm.com/developerworks/wikis/display/LinuxP/powerpc-utils 238c2ecf20Sopenharmony_ci 248c2ecf20Sopenharmony_ciWhat: /sys/devices/system/memory/memoryX/phys_device 258c2ecf20Sopenharmony_ciDate: September 2008 268c2ecf20Sopenharmony_ciContact: Badari Pulavarty <pbadari@us.ibm.com> 278c2ecf20Sopenharmony_ciDescription: 288c2ecf20Sopenharmony_ci The file /sys/devices/system/memory/memoryX/phys_device 298c2ecf20Sopenharmony_ci is read-only; it is a legacy interface only ever used on s390x 308c2ecf20Sopenharmony_ci to expose the covered storage increment. 318c2ecf20Sopenharmony_ciUsers: Legacy s390-tools lsmem/chmem 328c2ecf20Sopenharmony_ci 338c2ecf20Sopenharmony_ciWhat: /sys/devices/system/memory/memoryX/phys_index 348c2ecf20Sopenharmony_ciDate: September 2008 358c2ecf20Sopenharmony_ciContact: Badari Pulavarty <pbadari@us.ibm.com> 368c2ecf20Sopenharmony_ciDescription: 378c2ecf20Sopenharmony_ci The file /sys/devices/system/memory/memoryX/phys_index 388c2ecf20Sopenharmony_ci is read-only and contains the section ID in hexadecimal 398c2ecf20Sopenharmony_ci which is equivalent to decimal X contained in the 408c2ecf20Sopenharmony_ci memory section directory name. 418c2ecf20Sopenharmony_ci 428c2ecf20Sopenharmony_ciWhat: /sys/devices/system/memory/memoryX/state 438c2ecf20Sopenharmony_ciDate: September 2008 448c2ecf20Sopenharmony_ciContact: Badari Pulavarty <pbadari@us.ibm.com> 458c2ecf20Sopenharmony_ciDescription: 468c2ecf20Sopenharmony_ci The file /sys/devices/system/memory/memoryX/state 478c2ecf20Sopenharmony_ci is read-write. When read, its contents show the 488c2ecf20Sopenharmony_ci online/offline state of the memory section. When written, 498c2ecf20Sopenharmony_ci root can toggle the the online/offline state of a removable 508c2ecf20Sopenharmony_ci memory section (see removable file description above) 518c2ecf20Sopenharmony_ci using the following commands:: 528c2ecf20Sopenharmony_ci 538c2ecf20Sopenharmony_ci # echo online > /sys/devices/system/memory/memoryX/state 548c2ecf20Sopenharmony_ci # echo offline > /sys/devices/system/memory/memoryX/state 558c2ecf20Sopenharmony_ci 568c2ecf20Sopenharmony_ci For example, if /sys/devices/system/memory/memory22/removable 578c2ecf20Sopenharmony_ci contains a value of 1 and 588c2ecf20Sopenharmony_ci /sys/devices/system/memory/memory22/state contains the 598c2ecf20Sopenharmony_ci string "online" the following command can be executed by 608c2ecf20Sopenharmony_ci by root to offline that section:: 618c2ecf20Sopenharmony_ci 628c2ecf20Sopenharmony_ci # echo offline > /sys/devices/system/memory/memory22/state 638c2ecf20Sopenharmony_ci 648c2ecf20Sopenharmony_ciUsers: hotplug memory remove tools 658c2ecf20Sopenharmony_ci http://www.ibm.com/developerworks/wikis/display/LinuxP/powerpc-utils 668c2ecf20Sopenharmony_ci 678c2ecf20Sopenharmony_ci 688c2ecf20Sopenharmony_ciWhat: /sys/devices/system/memory/memoryX/valid_zones 698c2ecf20Sopenharmony_ciDate: July 2014 708c2ecf20Sopenharmony_ciContact: Zhang Zhen <zhenzhang.zhang@huawei.com> 718c2ecf20Sopenharmony_ciDescription: 728c2ecf20Sopenharmony_ci The file /sys/devices/system/memory/memoryX/valid_zones is 738c2ecf20Sopenharmony_ci read-only and is designed to show which zone this memory 748c2ecf20Sopenharmony_ci block can be onlined to. 758c2ecf20Sopenharmony_ci 768c2ecf20Sopenharmony_ciWhat: /sys/devices/system/memoryX/nodeY 778c2ecf20Sopenharmony_ciDate: October 2009 788c2ecf20Sopenharmony_ciContact: Linux Memory Management list <linux-mm@kvack.org> 798c2ecf20Sopenharmony_ciDescription: 808c2ecf20Sopenharmony_ci When CONFIG_NUMA is enabled, a symbolic link that 818c2ecf20Sopenharmony_ci points to the corresponding NUMA node directory. 828c2ecf20Sopenharmony_ci 838c2ecf20Sopenharmony_ci For example, the following symbolic link is created for 848c2ecf20Sopenharmony_ci memory section 9 on node0: 858c2ecf20Sopenharmony_ci 868c2ecf20Sopenharmony_ci /sys/devices/system/memory/memory9/node0 -> ../../node/node0 878c2ecf20Sopenharmony_ci 888c2ecf20Sopenharmony_ci 898c2ecf20Sopenharmony_ciWhat: /sys/devices/system/node/nodeX/memoryY 908c2ecf20Sopenharmony_ciDate: September 2008 918c2ecf20Sopenharmony_ciContact: Gary Hade <garyhade@us.ibm.com> 928c2ecf20Sopenharmony_ciDescription: 938c2ecf20Sopenharmony_ci When CONFIG_NUMA is enabled 948c2ecf20Sopenharmony_ci /sys/devices/system/node/nodeX/memoryY is a symbolic link that 958c2ecf20Sopenharmony_ci points to the corresponding /sys/devices/system/memory/memoryY 968c2ecf20Sopenharmony_ci memory section directory. For example, the following symbolic 978c2ecf20Sopenharmony_ci link is created for memory section 9 on node0. 988c2ecf20Sopenharmony_ci 998c2ecf20Sopenharmony_ci /sys/devices/system/node/node0/memory9 -> ../../memory/memory9 100