From: Fan Ni <nifan.cxl@gmail.com>
To: shiju.jose@huawei.com
Cc: linux-cxl@vger.kernel.org, dan.j.williams@intel.com,
jonathan.cameron@huawei.com, dave.jiang@intel.com,
dave@stgolabs.net, alison.schofield@intel.com,
vishal.l.verma@intel.com, ira.weiny@intel.com,
linux-edac@vger.kernel.org, linux-doc@vger.kernel.org,
bp@alien8.de, tony.luck@intel.com, lenb@kernel.org,
Yazen.Ghannam@amd.com, mchehab@kernel.org, nifan.cxl@gmail.com,
linuxarm@huawei.com, tanxiaofei@huawei.com,
prime.zeng@hisilicon.com, roberto.sassu@huawei.com,
kangkang.shen@futurewei.com, wanghuiqiang@huawei.com
Subject: Re: [PATCH v6 1/8] EDAC: Update documentation for the CXL memory patrol scrub control feature
Date: Wed, 21 May 2025 16:28:28 +0000 [thread overview]
Message-ID: <aC3_LDduxFk_V_AP@smc-140338-bm01> (raw)
In-Reply-To: <20250521124749.817-2-shiju.jose@huawei.com>
On Wed, May 21, 2025 at 01:47:39PM +0100, shiju.jose@huawei.com wrote:
> From: Shiju Jose <shiju.jose@huawei.com>
>
> Update the Documentation/edac/scrub.rst to include use cases and
> policies for CXL memory device-based, CXL region-based patrol scrub
> control and CXL Error Check Scrub (ECS).
>
> Reviewed-by: Dave Jiang <dave.jiang@intel.com>
> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Signed-off-by: Shiju Jose <shiju.jose@huawei.com>
Reviewed-by: Fan Ni <fan.ni@samsung.com>
> ---
> Documentation/edac/scrub.rst | 76 ++++++++++++++++++++++++++++++++++++
> 1 file changed, 76 insertions(+)
>
> diff --git a/Documentation/edac/scrub.rst b/Documentation/edac/scrub.rst
> index daab929cdba1..2cfa74fa1ffd 100644
> --- a/Documentation/edac/scrub.rst
> +++ b/Documentation/edac/scrub.rst
> @@ -264,3 +264,79 @@ 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 Patrol Scrub
> +
> +The following are the use cases identified why we might increase the scrub rate.
> +
> +- Scrubbing is needed at device granularity because a device is showing
> + unexpectedly high errors.
> +
> +- Scrubbing may apply to memory that isn't online at all yet. Likely this
> + is a system wide default setting on boot.
> +
> +- Scrubbing at a higher rate because the monitor software has determined that
> + more reliability is necessary for a particular data set. This is called
> + Differentiated Reliability.
> +
> +1.1. Device based scrubbing
> +
> +CXL memory is exposed to memory management subsystem and ultimately userspace
> +via CXL devices. Device-based scrubbing is used for the first use case
> +described in "Section 1 CXL Memory Patrol Scrub".
> +
> +When combining control via the device interfaces and region interfaces,
> +"see Section 1.2 Region based scrubbing".
> +
> +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.
> +
> +Region-based scrubbing is used for the third use case described in
> +"Section 1 CXL Memory Patrol Scrub".
> +
> +Userspace must follow below set of rules on how to set the scrub rates for any
> +mixture of requirements.
> +
> +1. Taking each region in turn from lowest desired scrub rate to highest and set
> + their scrub rates. Later regions may override the scrub rate on individual
> + devices (and hence potentially whole regions).
> +
> +2. Take each device for which enhanced scrubbing is required (higher rate) and
> + set those scrub rates. This will override the scrub rates of individual devices,
> + setting them to the maximum rate required for any of the regions they help back,
> + unless a specific rate is already defined.
> +
> +Sysfs files for scrubbing are documented in
> +`Documentation/ABI/testing/sysfs-edac-scrub`
> +
> +2. CXL memory Error Check Scrub (ECS)
> +
> +The Error Check Scrub (ECS) feature enables a memory device to perform error
> +checking and correction (ECC) and count single-bit errors. The associated
> +memory controller sets the ECS mode with a trigger sent to the memory
> +device. CXL ECS control allows the host, thus the userspace, to change the
> +attributes for error count mode, threshold number of errors per segment
> +(indicating how many segments have at least that number of errors) for
> +reporting errors, and reset the ECS counter. Thus the responsibility for
> +initiating Error Check Scrub on a memory device may lie with the memory
> +controller or platform when unexpectedly high error rates are detected.
> +
> +Sysfs files for scrubbing are documented in
> +`Documentation/ABI/testing/sysfs-edac-ecs`
> --
> 2.43.0
>
--
Fan Ni (From gmail)
next prev parent reply other threads:[~2025-05-21 16:28 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-21 12:47 [PATCH v6 0/8] cxl: support CXL memory RAS features shiju.jose
2025-05-21 12:47 ` [PATCH v6 1/8] EDAC: Update documentation for the CXL memory patrol scrub control feature shiju.jose
2025-05-21 16:28 ` Fan Ni [this message]
2025-05-21 12:47 ` [PATCH v6 2/8] cxl: Update prototype of function get_support_feature_info() shiju.jose
2025-05-21 16:31 ` Fan Ni
2025-05-21 12:47 ` [PATCH v6 3/8] cxl/edac: Add CXL memory device patrol scrub control feature shiju.jose
2025-05-21 14:40 ` Jonathan Cameron
2025-05-21 23:55 ` Dave Jiang
2025-05-21 17:07 ` Alison Schofield
2025-05-21 17:48 ` Jonathan Cameron
2025-05-21 20:17 ` Alison Schofield
2025-05-21 12:47 ` [PATCH v6 4/8] cxl/edac: Add CXL memory device ECS " shiju.jose
2025-05-21 12:47 ` [PATCH v6 5/8] cxl/edac: Add support for PERFORM_MAINTENANCE command shiju.jose
2025-05-21 12:47 ` [PATCH v6 6/8] cxl/edac: Support for finding memory operation attributes from the current boot shiju.jose
2025-05-21 12:47 ` [PATCH v6 7/8] cxl/edac: Add CXL memory device memory sparing control feature shiju.jose
2025-05-23 18:50 ` Dan Williams
2025-05-21 12:47 ` [PATCH v6 8/8] cxl/edac: Add CXL memory device soft PPR " shiju.jose
2025-05-21 14:59 ` [PATCH v6 0/8] cxl: support CXL memory RAS features Jonathan Cameron
2025-05-21 20:19 ` Alison Schofield
2025-05-23 18:53 ` Dan Williams
2025-05-23 20:38 ` Dave Jiang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aC3_LDduxFk_V_AP@smc-140338-bm01 \
--to=nifan.cxl@gmail.com \
--cc=Yazen.Ghannam@amd.com \
--cc=alison.schofield@intel.com \
--cc=bp@alien8.de \
--cc=dan.j.williams@intel.com \
--cc=dave.jiang@intel.com \
--cc=dave@stgolabs.net \
--cc=ira.weiny@intel.com \
--cc=jonathan.cameron@huawei.com \
--cc=kangkang.shen@futurewei.com \
--cc=lenb@kernel.org \
--cc=linux-cxl@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-edac@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=mchehab@kernel.org \
--cc=prime.zeng@hisilicon.com \
--cc=roberto.sassu@huawei.com \
--cc=shiju.jose@huawei.com \
--cc=tanxiaofei@huawei.com \
--cc=tony.luck@intel.com \
--cc=vishal.l.verma@intel.com \
--cc=wanghuiqiang@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox