| Badari Pulavarty | 5c755e9 | 2008-07-23 21:28:19 -0700 | [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. | 
| Badari Pulavarty | 5c755e9 | 2008-07-23 21:28:19 -0700 | [diff] [blame] | 9 | Users:		hotplug memory add/remove tools | 
| Justin P. Mattock | 0ea6e61 | 2010-07-23 20:51:24 -0700 | [diff] [blame] | 10 | http://www.ibm.com/developerworks/wikis/display/LinuxP/powerpc-utils | 
| Badari Pulavarty | 5c755e9 | 2008-07-23 21:28:19 -0700 | [diff] [blame] | 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 | 
| Badari Pulavarty | 5c755e9 | 2008-07-23 21:28:19 -0700 | [diff] [blame] | 21 | Users:		hotplug memory remove tools | 
| Justin P. Mattock | 0ea6e61 | 2010-07-23 20:51:24 -0700 | [diff] [blame] | 22 | http://www.ibm.com/developerworks/wikis/display/LinuxP/powerpc-utils | 
| Gary Hade | c04fc58 | 2009-01-06 14:39:14 -0800 | [diff] [blame] | 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 | 
|  | 29 | is read-only and is designed to show the name of physical | 
|  | 30 | memory device.  Implementation is currently incomplete. | 
|  | 31 |  | 
|  | 32 | What:		/sys/devices/system/memory/memoryX/phys_index | 
|  | 33 | Date:		September 2008 | 
|  | 34 | Contact:	Badari Pulavarty <pbadari@us.ibm.com> | 
|  | 35 | Description: | 
|  | 36 | The file /sys/devices/system/memory/memoryX/phys_index | 
|  | 37 | is read-only and contains the section ID in hexadecimal | 
|  | 38 | which is equivalent to decimal X contained in the | 
|  | 39 | memory section directory name. | 
|  | 40 |  | 
|  | 41 | What:		/sys/devices/system/memory/memoryX/state | 
|  | 42 | Date:		September 2008 | 
|  | 43 | Contact:	Badari Pulavarty <pbadari@us.ibm.com> | 
|  | 44 | Description: | 
|  | 45 | The file /sys/devices/system/memory/memoryX/state | 
| Francis Galiegue | a33f322 | 2010-04-23 00:08:02 +0200 | [diff] [blame] | 46 | is read-write.  When read, its contents show the | 
| Gary Hade | c04fc58 | 2009-01-06 14:39:14 -0800 | [diff] [blame] | 47 | online/offline state of the memory section.  When written, | 
|  | 48 | root can toggle the the online/offline state of a removable | 
|  | 49 | memory section (see removable file description above) | 
|  | 50 | using the following commands. | 
|  | 51 | # echo online > /sys/devices/system/memory/memoryX/state | 
|  | 52 | # echo offline > /sys/devices/system/memory/memoryX/state | 
|  | 53 |  | 
|  | 54 | For example, if /sys/devices/system/memory/memory22/removable | 
|  | 55 | contains a value of 1 and | 
|  | 56 | /sys/devices/system/memory/memory22/state contains the | 
|  | 57 | string "online" the following command can be executed by | 
|  | 58 | by root to offline that section. | 
|  | 59 | # echo offline > /sys/devices/system/memory/memory22/state | 
|  | 60 | Users:		hotplug memory remove tools | 
| Justin P. Mattock | 0ea6e61 | 2010-07-23 20:51:24 -0700 | [diff] [blame] | 61 | http://www.ibm.com/developerworks/wikis/display/LinuxP/powerpc-utils | 
| Gary Hade | c04fc58 | 2009-01-06 14:39:14 -0800 | [diff] [blame] | 62 |  | 
| Alex Chiang | dee5d0d | 2009-12-14 17:59:05 -0800 | [diff] [blame] | 63 |  | 
|  | 64 | What:		/sys/devices/system/memoryX/nodeY | 
|  | 65 | Date:		October 2009 | 
|  | 66 | Contact:	Linux Memory Management list <linux-mm@kvack.org> | 
|  | 67 | Description: | 
|  | 68 | When CONFIG_NUMA is enabled, a symbolic link that | 
|  | 69 | points to the corresponding NUMA node directory. | 
|  | 70 |  | 
|  | 71 | For example, the following symbolic link is created for | 
|  | 72 | memory section 9 on node0: | 
|  | 73 | /sys/devices/system/memory/memory9/node0 -> ../../node/node0 | 
|  | 74 |  | 
|  | 75 |  | 
| Gary Hade | c04fc58 | 2009-01-06 14:39:14 -0800 | [diff] [blame] | 76 | What:		/sys/devices/system/node/nodeX/memoryY | 
|  | 77 | Date:		September 2008 | 
|  | 78 | Contact:	Gary Hade <garyhade@us.ibm.com> | 
|  | 79 | Description: | 
|  | 80 | When CONFIG_NUMA is enabled | 
|  | 81 | /sys/devices/system/node/nodeX/memoryY is a symbolic link that | 
|  | 82 | points to the corresponding /sys/devices/system/memory/memoryY | 
|  | 83 | memory section directory.  For example, the following symbolic | 
|  | 84 | link is created for memory section 9 on node0. | 
|  | 85 | /sys/devices/system/node/node0/memory9 -> ../../memory/memory9 |