Skip to contentSkip to conversation

EDAC: Expose node and memory controller link in sysfs if CONFIG_NUMA

PATCH New Yajun Deng 1 participant 1 message May 22, 2023

Subsystems (2)
lore
Share & tools
lore

Yajun Deng

author
#0 lore raw

PATCH v2 1/1 EDAC: Expose node and memory controller link in sysfs if CONFIG_NUMA

The node* directory in sysfs already has cpu link and memory link, memory controller is also a resource under node. Therefore, expose the memory controller symbolic link under the node* directory if CONFIG_NUMA.

The mc directory in sysfs can have multiple mc* directories, which can belong to different nodes. To know which node each mc belogs to, expose node symbolic link under the mc* directory if CONFIG_NUMA.

At the same time, change the type of EDAC from tristate to boolean because it needs node_devices.

---
 Documentation/ABI/testing/sysfs-devices-edac | 26 +++++++++
 Documentation/admin-guide/ras.rst            |  2 +
 drivers/edac/Kconfig                         |  2 +-
 drivers/edac/edac_mc_sysfs.c                 | 60 ++++++++++++++++++++
 4 files changed, 89 insertions(+), 1 deletion(-)
Documentation/ABI/testing/sysfs-devices-edac +26 -0
index 256a9e990c0b..2735dde61e0b 100644
@@ -155,3 +155,29 @@ Description:	This attribute file displays the total count of uncorrectable
 		errors that have occurred on this DIMM. If panic_on_ue is set, this
 		counter will not have a chance to increment, since EDAC will panic the
 		system
+
+What:		/sys/devices/system/edac/mc/mc*/node*
+Date:		May 2023
+Contact:	Yajun Deng <[email protected]>
+		[email protected]
+Description:	When CONFIG_NUMA is enabled, a symbolic link that points to the
+		corresponding NUMA node directory.
+
+		For example, on node0 with two memory control directories mc0 and mc1
+		the symlinks are::
+
+		  /sys/devices/system/edac/mc/mc0/node0 -> ../../../node/node0
+		  /sys/devices/system/edac/mc/mc1/node0 -> ../../../node/node0
+
+What:		/sys/devices/system/node/node*/mc*
+Date:		May 2023
+Contact:	Yajun Deng <[email protected]>
+		[email protected]
+Description:	When CONFIG_NUMA is enabled, a symbolic link that points to the
+		corresponding memory control directory.
+
+		For example, on node0 with two memory control directories mc0 and mc1
+		the symlinks are::
+
+		  /sys/devices/system/node/node0/mc0 -> ../../edac/mc/mc0
+		  /sys/devices/system/node/node0/mc1 -> ../../edac/mc/mc1
Documentation/admin-guide/ras.rst +2 -0
index 8e03751d126d..ef7cc9867fc8 100644
@@ -458,6 +458,7 @@ A typical EDAC system has the following structure under
 	│   │   │   └── uevent
 	│   │   ├── max_location
 	│   │   ├── mc_name
+	│   │   ├── node0 -> ../../../node/node0  #if CONFIG_NUMA
 	│   │   ├── reset_counters
 	│   │   ├── seconds_since_reset
 	│   │   ├── size_mb
@@ -479,6 +480,7 @@ A typical EDAC system has the following structure under
 	│   │   │   └── uevent
 	│   │   ├── max_location
 	│   │   ├── mc_name
+	│   │   ├── node0 -> ../../../node/node0  #if CONFIG_NUMA
 	│   │   ├── reset_counters
 	│   │   ├── seconds_since_reset
 	│   │   ├── size_mb
drivers/edac/Kconfig +1 -1
index 68f576700911..e61a29e0eb28 100644
@@ -10,7 +10,7 @@ config EDAC_SUPPORT
 	bool
 
 menuconfig EDAC
-	tristate "EDAC (Error Detection And Correction) reporting"
+	bool "EDAC (Error Detection And Correction) reporting"
 	depends on HAS_IOMEM && EDAC_SUPPORT && RAS
 	help
 	  EDAC is a subsystem along with hardware-specific drivers designed to
drivers/edac/edac_mc_sysfs.c +60 -0

84 lines not on this page · raw message

Signature · 1 line
2.25.1