Documentation/ABI/testing/sysfs-devices-memory

Source file repositories/reference/linux-study-clean/Documentation/ABI/testing/sysfs-devices-memory

File Facts

System
Linux kernel
Corpus path
Documentation/ABI/testing/sysfs-devices-memory
Extension
[no extension]
Size
4752 bytes
Lines
121
Domain
Support Tooling And Documentation
Bucket
Documentation
Inferred role
Support Tooling And Documentation: Documentation
Status
atlas-only

Why This File Exists

Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.

Dependency Surface

Detected Declarations

Annotated Snippet

What:		/sys/devices/system/memory
Date:		June 2008
Contact:	Badari Pulavarty <pbadari@us.ibm.com>
Description:
		The /sys/devices/system/memory contains a snapshot of the
		internal state of the kernel memory blocks. Files could be
		added or removed dynamically to represent hot-add/remove
		operations.
Users:		hotplug memory add/remove tools
		http://www.ibm.com/developerworks/wikis/display/LinuxP/powerpc-utils

What:		/sys/devices/system/memory/memoryX/removable
Date:		June 2008
Contact:	Badari Pulavarty <pbadari@us.ibm.com>
Description:
		The file /sys/devices/system/memory/memoryX/removable is a
		legacy interface used to indicated whether a memory block is
		likely to be offlineable or not.  Newer kernel versions return
		"1" if and only if the kernel supports memory offlining.
Users:		hotplug memory remove tools
		http://www.ibm.com/developerworks/wikis/display/LinuxP/powerpc-utils
		lsmem/chmem part of util-linux

What:		/sys/devices/system/memory/memoryX/phys_device
Date:		September 2008
Contact:	Badari Pulavarty <pbadari@us.ibm.com>
Description:
		The file /sys/devices/system/memory/memoryX/phys_device
		is read-only;  it is a legacy interface only ever used on s390x
		to expose the covered storage increment.
Users:		Legacy s390-tools lsmem/chmem

What:		/sys/devices/system/memory/memoryX/phys_index
Date:		September 2008
Contact:	Badari Pulavarty <pbadari@us.ibm.com>
Description:
		The file /sys/devices/system/memory/memoryX/phys_index
		is read-only and contains the section ID in hexadecimal
		which is equivalent to decimal X contained in the
		memory section directory name.

What:		/sys/devices/system/memory/memoryX/state
Date:		September 2008
Contact:	Badari Pulavarty <pbadari@us.ibm.com>
Description:
		The file /sys/devices/system/memory/memoryX/state
		is read-write.  When read, it returns the online/offline
		state of the memory block.  When written, root can toggle
		the online/offline state of a memory block using the following
		commands::

		  # echo online > /sys/devices/system/memory/memoryX/state
		  # echo offline > /sys/devices/system/memory/memoryX/state

		On newer kernel versions, advanced states can be specified
		when onlining to select a target zone: "online_movable"
		selects the movable zone.  "online_kernel" selects the
		applicable kernel zone (DMA, DMA32, or Normal).  However,
		after successfully setting one of the advanced states,
		reading the file will return "online"; the zone information
		can be obtained via "valid_zones" instead.

		While onlining is unlikely to fail, there are no guarantees
		that offlining will succeed.  Offlining is more likely to
		succeed if "valid_zones" indicates "Movable".
Users:		hotplug memory remove tools
		http://www.ibm.com/developerworks/wikis/display/LinuxP/powerpc-utils


What:           /sys/devices/system/memory/memoryX/valid_zones

Annotation

Implementation Notes