Skip to contentSkip to conversation

cxl/memdev: Add background command sysfs file

RFC PATCH In review Jeongtae Park 1 participant 1 message Sep 22, 2023 1 message not in the archive CXL

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): CGME20230922130321epcas2p1e3041a8a284e8aa3a3b203ca3380d1db@epcas2p1.samsung.com

#1 lore raw

RFC PATCH 3/3 cxl/memdev: Add background command sysfs file

Add a read-only sysfs file to notify the background command state of a device:

/sys/bus/cxl/devices/memX/bgcmd/complete

---
 Documentation/ABI/testing/sysfs-bus-cxl | 10 ++++
 drivers/cxl/core/memdev.c               | 63 +++++++++++++++++++++++++
 2 files changed, 73 insertions(+)
Documentation/ABI/testing/sysfs-bus-cxl +10 -0
index 6350dd82b9a9..e9773f20deac 100644
@@ -477,3 +477,13 @@ Description:
 		attribute is only visible for devices supporting the
 		capability. The retrieved errors are logged as kernel
 		events when cxl_poison event tracing is enabled.
+
+What:		/sys/bus/cxl/devices/memX/bgcmd/complete
+Date:		September, 2023
+KernelVersion:	v6.6
+Contact:	[email protected]
+Description:
+		(RO) This file can be used to read the processing status of
+		background commands. When a background command starts successfully,
+		it represents the progress as a percentage, and when it finishes,
+		userspace can read the opcode of a completed background operations.
drivers/cxl/core/memdev.c +63 -0

98 lines not on this page · raw message

Signature · 1 line
2.34.1