From: Shiju Jose <shiju.jose@xxxxxxxxxx> Update the Documentation/edac/scrub.rst to include descriptions and policies for CXL memory device-based and CXL region-based patrol scrub control. Note: This may require inputs from CXL memory experts regarding region-based scrubbing policies. Signed-off-by: Shiju Jose <shiju.jose@xxxxxxxxxx> --- Documentation/edac/scrub.rst | 47 ++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/Documentation/edac/scrub.rst b/Documentation/edac/scrub.rst index daab929cdba1..d1c02bd90090 100644 --- a/Documentation/edac/scrub.rst +++ b/Documentation/edac/scrub.rst @@ -264,3 +264,51 @@ Sysfs files are documented in `Documentation/ABI/testing/sysfs-edac-scrub` `Documentation/ABI/testing/sysfs-edac-ecs` + +Examples +-------- + +The usage takes the form shown in these examples: + +1. CXL memory device patrol scrubber + +1.1 Device based scrubbing + +CXL memory is exposed to memory management subsystem and ultimately userspace +via CXL devices. + +For cases where hardware interleave controls do not directly map to regions of +Physical Address space, perhaps due to interleave the approach described in +1.2 Region based scrubbing section, which is specific to CXL regions should be +followed. In those cases settings on the presented interface may interact with +direct control via a device instance specific interface and care must be taken. + +Sysfs files for scrubbing are documented in +`Documentation/ABI/testing/sysfs-edac-scrub` + +1.2. Region based scrubbing + +CXL memory is exposed to memory management subsystem and ultimately userspace +via CXL regions. CXL Regions represent mapped memory capacity in system +physical address space. These can incorporate one or more parts of multiple CXL +memory devices with traffic interleaved across them. The user may want to control +the scrub rate via this more abstract region instead of having to figure out the +constituent devices and program them separately. The scrub rate for each device +covers the whole device. Thus if multiple regions use parts of that device then +requests for scrubbing of other regions may result in a higher scrub rate than +requested for this specific region. + +1. When user sets scrub rate for a memory region, the scrub rate for all the CXL + memory devices interleaved under that region is updated with the same scrub + rate. + +2. When user sets scrub rate for a memory device, only the scrub rate for that + memory devices is updated though device may be part of a memory region and + does not change scrub rate of other memory devices of that memory region. + +3. Scrub rate of a CXL memory device may be set via EDAC device or region scrub + interface simultaneously. Care must be taken to prevent a race condition, or + only region-based setting may be allowed. + +Sysfs files for scrubbing are documented in +`Documentation/ABI/testing/sysfs-edac-scrub` -- 2.43.0