Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 1 | What: /sys/devices/system/memory |
| 2 | Date: June 2008 |
| 3 | Contact: Badari Pulavarty <pbadari@us.ibm.com> |
| 4 | Description: |
| 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 |
| 8 | operations. |
| 9 | Users: hotplug memory add/remove tools |
| 10 | http://www.ibm.com/developerworks/wikis/display/LinuxP/powerpc-utils |
| 11 | |
| 12 | What: /sys/devices/system/memory/memoryX/removable |
| 13 | Date: June 2008 |
| 14 | Contact: Badari Pulavarty <pbadari@us.ibm.com> |
| 15 | Description: |
| 16 | The file /sys/devices/system/memory/memoryX/removable |
| 17 | indicates whether this memory block is removable or not. |
| 18 | This is useful for a user-level agent to determine |
| 19 | identify removable sections of the memory before attempting |
| 20 | potentially expensive hot-remove memory operation |
| 21 | Users: hotplug memory remove tools |
| 22 | http://www.ibm.com/developerworks/wikis/display/LinuxP/powerpc-utils |
| 23 | |
| 24 | What: /sys/devices/system/memory/memoryX/phys_device |
| 25 | Date: September 2008 |
| 26 | Contact: Badari Pulavarty <pbadari@us.ibm.com> |
| 27 | Description: |
| 28 | The file /sys/devices/system/memory/memoryX/phys_device |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame^] | 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 |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 32 | |
| 33 | What: /sys/devices/system/memory/memoryX/phys_index |
| 34 | Date: September 2008 |
| 35 | Contact: Badari Pulavarty <pbadari@us.ibm.com> |
| 36 | Description: |
| 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. |
| 41 | |
| 42 | What: /sys/devices/system/memory/memoryX/state |
| 43 | Date: September 2008 |
| 44 | Contact: Badari Pulavarty <pbadari@us.ibm.com> |
| 45 | Description: |
| 46 | The file /sys/devices/system/memory/memoryX/state |
| 47 | is read-write. When read, its contents show the |
| 48 | online/offline state of the memory section. When written, |
| 49 | root can toggle the the online/offline state of a removable |
| 50 | memory section (see removable file description above) |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame^] | 51 | using the following commands:: |
| 52 | |
| 53 | # echo online > /sys/devices/system/memory/memoryX/state |
| 54 | # echo offline > /sys/devices/system/memory/memoryX/state |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 55 | |
| 56 | For example, if /sys/devices/system/memory/memory22/removable |
| 57 | contains a value of 1 and |
| 58 | /sys/devices/system/memory/memory22/state contains the |
| 59 | string "online" the following command can be executed by |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame^] | 60 | by root to offline that section:: |
| 61 | |
| 62 | # echo offline > /sys/devices/system/memory/memory22/state |
| 63 | |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 64 | Users: hotplug memory remove tools |
| 65 | http://www.ibm.com/developerworks/wikis/display/LinuxP/powerpc-utils |
| 66 | |
| 67 | |
| 68 | What: /sys/devices/system/memory/memoryX/valid_zones |
| 69 | Date: July 2014 |
| 70 | Contact: Zhang Zhen <zhenzhang.zhang@huawei.com> |
| 71 | Description: |
| 72 | The file /sys/devices/system/memory/memoryX/valid_zones is |
| 73 | read-only and is designed to show which zone this memory |
| 74 | block can be onlined to. |
| 75 | |
| 76 | What: /sys/devices/system/memoryX/nodeY |
| 77 | Date: October 2009 |
| 78 | Contact: Linux Memory Management list <linux-mm@kvack.org> |
| 79 | Description: |
| 80 | When CONFIG_NUMA is enabled, a symbolic link that |
| 81 | points to the corresponding NUMA node directory. |
| 82 | |
| 83 | For example, the following symbolic link is created for |
| 84 | memory section 9 on node0: |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame^] | 85 | |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 86 | /sys/devices/system/memory/memory9/node0 -> ../../node/node0 |
| 87 | |
| 88 | |
| 89 | What: /sys/devices/system/node/nodeX/memoryY |
| 90 | Date: September 2008 |
| 91 | Contact: Gary Hade <garyhade@us.ibm.com> |
| 92 | Description: |
| 93 | When CONFIG_NUMA is enabled |
| 94 | /sys/devices/system/node/nodeX/memoryY is a symbolic link that |
| 95 | points to the corresponding /sys/devices/system/memory/memoryY |
| 96 | memory section directory. For example, the following symbolic |
| 97 | link is created for memory section 9 on node0. |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame^] | 98 | |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 99 | /sys/devices/system/node/node0/memory9 -> ../../memory/memory9 |