Files
linux/Documentation/ABI/testing/sysfs-edac-scrub
Shiju Jose f90b738166 EDAC: Add scrub control feature
Add a scrub control to manage memory scrubbers in the system.

Devices with a scrub feature register with the EDAC device driver which
retrieves the scrub descriptor from the scrub driver and exposes the
control attributes for a instance to userspace at

  /sys/bus/edac/devices/<dev-name>/scrubX/.

The common sysfs scrub control interface abstracts the control of
arbitrary scrubbing functionality into a common set of functions. The
attribute nodes are only present if the client driver has implemented
the corresponding attribute callback function and passed the operations
to the device driver during registration.

  [ bp: Massage commit message, docs and code, simplify text a bit.
    Integrate fixup for: https://lore.kernel.org/r/202502251009.0sGkolEJ-lkp@intel.com
    Reported-by: kernel test robot <lkp@intel.com>
    Reported-by: Dan Carpenter <dan.carpenter@linaro.org> ]

Co-developed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Shiju Jose <shiju.jose@huawei.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Tested-by: Daniel Ferguson <danielf@os.amperecomputing.com>
Tested-by: Fan Ni <fan.ni@samsung.com>
Link: https://lore.kernel.org/r/20250212143654.1893-3-shiju.jose@huawei.com
2025-02-25 15:39:09 +01:00

70 lines
2.2 KiB
Plaintext

What: /sys/bus/edac/devices/<dev-name>/scrubX
Date: March 2025
KernelVersion: 6.15
Contact: linux-edac@vger.kernel.org
Description:
The sysfs EDAC bus devices /<dev-name>/scrubX subdirectory
belongs to an instance of memory scrub control feature,
where <dev-name> directory corresponds to a device/memory
region registered with the EDAC device driver for the
scrub control feature.
The sysfs scrub attr nodes are only present if the parent
driver has implemented the corresponding attr callback
function and provided the necessary operations to the EDAC
device driver during registration.
What: /sys/bus/edac/devices/<dev-name>/scrubX/addr
Date: March 2025
KernelVersion: 6.15
Contact: linux-edac@vger.kernel.org
Description:
(RW) The base address of the memory region to be scrubbed
for on-demand scrubbing. Setting address starts scrubbing.
The size must be set before that.
The readback addr value is non-zero if the requested
on-demand scrubbing is in progress, zero otherwise.
What: /sys/bus/edac/devices/<dev-name>/scrubX/size
Date: March 2025
KernelVersion: 6.15
Contact: linux-edac@vger.kernel.org
Description:
(RW) The size of the memory region to be scrubbed
(on-demand scrubbing).
What: /sys/bus/edac/devices/<dev-name>/scrubX/enable_background
Date: March 2025
KernelVersion: 6.15
Contact: linux-edac@vger.kernel.org
Description:
(RW) Start/Stop background (patrol) scrubbing if supported.
What: /sys/bus/edac/devices/<dev-name>/scrubX/min_cycle_duration
Date: March 2025
KernelVersion: 6.15
Contact: linux-edac@vger.kernel.org
Description:
(RO) Supported minimum scrub cycle duration in seconds
by the memory scrubber.
What: /sys/bus/edac/devices/<dev-name>/scrubX/max_cycle_duration
Date: March 2025
KernelVersion: 6.15
Contact: linux-edac@vger.kernel.org
Description:
(RO) Supported maximum scrub cycle duration in seconds
by the memory scrubber.
What: /sys/bus/edac/devices/<dev-name>/scrubX/current_cycle_duration
Date: March 2025
KernelVersion: 6.15
Contact: linux-edac@vger.kernel.org
Description:
(RW) The current scrub cycle duration in seconds and must be
within the supported range by the memory scrubber.
Scrub has an overhead when running and that may want to be
reduced by taking longer to do it.