sysfs-devices-memory 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. What: /sys/devices/system/memory
  2. Date: June 2008
  3. Contact: Badari Pulavarty <[email protected]>
  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. What: /sys/devices/system/memory/memoryX/removable
  12. Date: June 2008
  13. Contact: Badari Pulavarty <[email protected]>
  14. Description:
  15. The file /sys/devices/system/memory/memoryX/removable is a
  16. legacy interface used to indicated whether a memory block is
  17. likely to be offlineable or not. Newer kernel versions return
  18. "1" if and only if the kernel supports memory offlining.
  19. Users: hotplug memory remove tools
  20. http://www.ibm.com/developerworks/wikis/display/LinuxP/powerpc-utils
  21. lsmem/chmem part of util-linux
  22. What: /sys/devices/system/memory/memoryX/phys_device
  23. Date: September 2008
  24. Contact: Badari Pulavarty <[email protected]>
  25. Description:
  26. The file /sys/devices/system/memory/memoryX/phys_device
  27. is read-only; it is a legacy interface only ever used on s390x
  28. to expose the covered storage increment.
  29. Users: Legacy s390-tools lsmem/chmem
  30. What: /sys/devices/system/memory/memoryX/phys_index
  31. Date: September 2008
  32. Contact: Badari Pulavarty <[email protected]>
  33. Description:
  34. The file /sys/devices/system/memory/memoryX/phys_index
  35. is read-only and contains the section ID in hexadecimal
  36. which is equivalent to decimal X contained in the
  37. memory section directory name.
  38. What: /sys/devices/system/memory/memoryX/state
  39. Date: September 2008
  40. Contact: Badari Pulavarty <[email protected]>
  41. Description:
  42. The file /sys/devices/system/memory/memoryX/state
  43. is read-write. When read, it returns the online/offline
  44. state of the memory block. When written, root can toggle
  45. the online/offline state of a memory block using the following
  46. commands::
  47. # echo online > /sys/devices/system/memory/memoryX/state
  48. # echo offline > /sys/devices/system/memory/memoryX/state
  49. On newer kernel versions, advanced states can be specified
  50. when onlining to select a target zone: "online_movable"
  51. selects the movable zone. "online_kernel" selects the
  52. applicable kernel zone (DMA, DMA32, or Normal). However,
  53. after successfully setting one of the advanced states,
  54. reading the file will return "online"; the zone information
  55. can be obtained via "valid_zones" instead.
  56. While onlining is unlikely to fail, there are no guarantees
  57. that offlining will succeed. Offlining is more likely to
  58. succeed if "valid_zones" indicates "Movable".
  59. Users: hotplug memory remove tools
  60. http://www.ibm.com/developerworks/wikis/display/LinuxP/powerpc-utils
  61. What: /sys/devices/system/memory/memoryX/valid_zones
  62. Date: July 2014
  63. Contact: Zhang Zhen <[email protected]>
  64. Description:
  65. The file /sys/devices/system/memory/memoryX/valid_zones is
  66. read-only.
  67. For online memory blocks, it returns in which zone memory
  68. provided by a memory block is managed. If multiple zones
  69. apply (not applicable for hotplugged memory), "None" is returned
  70. and the memory block cannot be offlined.
  71. For offline memory blocks, it returns by which zone memory
  72. provided by a memory block can be managed when onlining.
  73. The first returned zone ("default") will be used when setting
  74. the state of an offline memory block to "online". Only one of
  75. the kernel zones (DMA, DMA32, Normal) is applicable for a single
  76. memory block.
  77. What: /sys/devices/system/memoryX/nodeY
  78. Date: October 2009
  79. Contact: Linux Memory Management list <[email protected]>
  80. Description:
  81. When CONFIG_NUMA is enabled, a symbolic link that
  82. points to the corresponding NUMA node directory.
  83. For example, the following symbolic link is created for
  84. memory section 9 on node0:
  85. /sys/devices/system/memory/memory9/node0 -> ../../node/node0
  86. What: /sys/devices/system/node/nodeX/memoryY
  87. Date: September 2008
  88. Contact: Gary Hade <[email protected]>
  89. Description:
  90. When CONFIG_NUMA is enabled
  91. /sys/devices/system/node/nodeX/memoryY is a symbolic link that
  92. points to the corresponding /sys/devices/system/memory/memoryY
  93. memory section directory. For example, the following symbolic
  94. link is created for memory section 9 on node0.
  95. /sys/devices/system/node/node0/memory9 -> ../../memory/memory9