xref: /linux/Documentation/ABI/testing/sysfs-devices-memory (revision c04fc586c1a480ba198f03ae7b6cbd7b57380b91)
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/
23*c04fc586SGary Hade
24*c04fc586SGary HadeWhat:		/sys/devices/system/memory/memoryX/phys_device
25*c04fc586SGary HadeDate:		September 2008
26*c04fc586SGary HadeContact:	Badari Pulavarty <pbadari@us.ibm.com>
27*c04fc586SGary HadeDescription:
28*c04fc586SGary Hade		The file /sys/devices/system/memory/memoryX/phys_device
29*c04fc586SGary Hade		is read-only and is designed to show the name of physical
30*c04fc586SGary Hade		memory device.  Implementation is currently incomplete.
31*c04fc586SGary Hade
32*c04fc586SGary HadeWhat:		/sys/devices/system/memory/memoryX/phys_index
33*c04fc586SGary HadeDate:		September 2008
34*c04fc586SGary HadeContact:	Badari Pulavarty <pbadari@us.ibm.com>
35*c04fc586SGary HadeDescription:
36*c04fc586SGary Hade		The file /sys/devices/system/memory/memoryX/phys_index
37*c04fc586SGary Hade		is read-only and contains the section ID in hexadecimal
38*c04fc586SGary Hade		which is equivalent to decimal X contained in the
39*c04fc586SGary Hade		memory section directory name.
40*c04fc586SGary Hade
41*c04fc586SGary HadeWhat:		/sys/devices/system/memory/memoryX/state
42*c04fc586SGary HadeDate:		September 2008
43*c04fc586SGary HadeContact:	Badari Pulavarty <pbadari@us.ibm.com>
44*c04fc586SGary HadeDescription:
45*c04fc586SGary Hade		The file /sys/devices/system/memory/memoryX/state
46*c04fc586SGary Hade		is read-write.  When read, it's contents show the
47*c04fc586SGary Hade		online/offline state of the memory section.  When written,
48*c04fc586SGary Hade		root can toggle the the online/offline state of a removable
49*c04fc586SGary Hade		memory section (see removable file description above)
50*c04fc586SGary Hade		using the following commands.
51*c04fc586SGary Hade		# echo online > /sys/devices/system/memory/memoryX/state
52*c04fc586SGary Hade		# echo offline > /sys/devices/system/memory/memoryX/state
53*c04fc586SGary Hade
54*c04fc586SGary Hade		For example, if /sys/devices/system/memory/memory22/removable
55*c04fc586SGary Hade		contains a value of 1 and
56*c04fc586SGary Hade		/sys/devices/system/memory/memory22/state contains the
57*c04fc586SGary Hade		string "online" the following command can be executed by
58*c04fc586SGary Hade		by root to offline that section.
59*c04fc586SGary Hade		# echo offline > /sys/devices/system/memory/memory22/state
60*c04fc586SGary HadeUsers:		hotplug memory remove tools
61*c04fc586SGary Hade		https://w3.opensource.ibm.com/projects/powerpc-utils/
62*c04fc586SGary Hade
63*c04fc586SGary HadeWhat:		/sys/devices/system/node/nodeX/memoryY
64*c04fc586SGary HadeDate:		September 2008
65*c04fc586SGary HadeContact:	Gary Hade <garyhade@us.ibm.com>
66*c04fc586SGary HadeDescription:
67*c04fc586SGary Hade		When CONFIG_NUMA is enabled
68*c04fc586SGary Hade		/sys/devices/system/node/nodeX/memoryY is a symbolic link that
69*c04fc586SGary Hade		points to the corresponding /sys/devices/system/memory/memoryY
70*c04fc586SGary Hade		memory section directory.  For example, the following symbolic
71*c04fc586SGary Hade		link is created for memory section 9 on node0.
72*c04fc586SGary Hade		/sys/devices/system/node/node0/memory9 -> ../../memory/memory9
73*c04fc586SGary Hade
74