xref: /linux/Documentation/ABI/testing/sysfs-devices-memory (revision dee5d0d518defd0337a41f1a504428c9acc87be5)
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
105c755e9fSBadari Pulavarty		https://w3.opensource.ibm.com/projects/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
225c755e9fSBadari Pulavarty		https://w3.opensource.ibm.com/projects/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
46c04fc586SGary Hade		is read-write.  When read, it's 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
61c04fc586SGary Hade		https://w3.opensource.ibm.com/projects/powerpc-utils/
62c04fc586SGary Hade
63*dee5d0d5SAlex Chiang
64*dee5d0d5SAlex ChiangWhat:		/sys/devices/system/memoryX/nodeY
65*dee5d0d5SAlex ChiangDate:		October 2009
66*dee5d0d5SAlex ChiangContact:	Linux Memory Management list <linux-mm@kvack.org>
67*dee5d0d5SAlex ChiangDescription:
68*dee5d0d5SAlex Chiang		When CONFIG_NUMA is enabled, a symbolic link that
69*dee5d0d5SAlex Chiang		points to the corresponding NUMA node directory.
70*dee5d0d5SAlex Chiang
71*dee5d0d5SAlex Chiang		For example, the following symbolic link is created for
72*dee5d0d5SAlex Chiang		memory section 9 on node0:
73*dee5d0d5SAlex Chiang		/sys/devices/system/memory/memory9/node0 -> ../../node/node0
74*dee5d0d5SAlex Chiang
75*dee5d0d5SAlex Chiang
76c04fc586SGary HadeWhat:		/sys/devices/system/node/nodeX/memoryY
77c04fc586SGary HadeDate:		September 2008
78c04fc586SGary HadeContact:	Gary Hade <garyhade@us.ibm.com>
79c04fc586SGary HadeDescription:
80c04fc586SGary Hade		When CONFIG_NUMA is enabled
81c04fc586SGary Hade		/sys/devices/system/node/nodeX/memoryY is a symbolic link that
82c04fc586SGary Hade		points to the corresponding /sys/devices/system/memory/memoryY
83c04fc586SGary Hade		memory section directory.  For example, the following symbolic
84c04fc586SGary Hade		link is created for memory section 9 on node0.
85c04fc586SGary Hade		/sys/devices/system/node/node0/memory9 -> ../../memory/memory9
86