All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shiju Jose <shiju.jose@huawei.com>
To: Randy Dunlap <rdunlap@infradead.org>,
	"rafael@kernel.org" <rafael@kernel.org>,
	"bp@alien8.de" <bp@alien8.de>,
	"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	"rppt@kernel.org" <rppt@kernel.org>,
	"dferguson@amperecomputing.com" <dferguson@amperecomputing.com>,
	"linux-edac@vger.kernel.org" <linux-edac@vger.kernel.org>,
	"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
	"tony.luck@intel.com" <tony.luck@intel.com>,
	"lenb@kernel.org" <lenb@kernel.org>,
	"leo.duran@amd.com" <leo.duran@amd.com>,
	"Yazen.Ghannam@amd.com" <Yazen.Ghannam@amd.com>,
	"mchehab@kernel.org" <mchehab@kernel.org>
Cc: Jonathan Cameron <jonathan.cameron@huawei.com>,
	Linuxarm <linuxarm@huawei.com>,
	"rientjes@google.com" <rientjes@google.com>,
	"jiaqiyan@google.com" <jiaqiyan@google.com>,
	"Jon.Grimm@amd.com" <Jon.Grimm@amd.com>,
	"dave.hansen@linux.intel.com" <dave.hansen@linux.intel.com>,
	"naoya.horiguchi@nec.com" <naoya.horiguchi@nec.com>,
	"james.morse@arm.com" <james.morse@arm.com>,
	"jthoughton@google.com" <jthoughton@google.com>,
	"somasundaram.a@hpe.com" <somasundaram.a@hpe.com>,
	"erdemaktas@google.com" <erdemaktas@google.com>,
	"pgonda@google.com" <pgonda@google.com>,
	"duenwen@google.com" <duenwen@google.com>,
	"gthelen@google.com" <gthelen@google.com>,
	"wschwartz@amperecomputing.com" <wschwartz@amperecomputing.com>,
	"wbs@os.amperecomputing.com" <wbs@os.amperecomputing.com>,
	"nifan.cxl@gmail.com" <nifan.cxl@gmail.com>,
	tanxiaofei <tanxiaofei@huawei.com>,
	"Zengtao (B)" <prime.zeng@hisilicon.com>,
	"Roberto Sassu" <roberto.sassu@huawei.com>,
	"kangkang.shen@futurewei.com" <kangkang.shen@futurewei.com>,
	wanghuiqiang <wanghuiqiang@huawei.com>
Subject: RE: [PATCH v13 2/2] ras: mem: Add ACPI RAS2 memory driver
Date: Mon, 24 Nov 2025 10:00:11 +0000	[thread overview]
Message-ID: <78ee1bf7cfe34909bf09b429e81e63a7@huawei.com> (raw)
In-Reply-To: <26083ba9-1979-4d14-8465-3f54f2f96d23@infradead.org>



>-----Original Message-----
>From: Randy Dunlap <rdunlap@infradead.org>
>Sent: 22 November 2025 05:23
>To: Shiju Jose <shiju.jose@huawei.com>; rafael@kernel.org; bp@alien8.de;
>akpm@linux-foundation.org; rppt@kernel.org;
>dferguson@amperecomputing.com; linux-edac@vger.kernel.org; linux-
>acpi@vger.kernel.org; linux-mm@kvack.org; linux-doc@vger.kernel.org;
>tony.luck@intel.com; lenb@kernel.org; leo.duran@amd.com;
>Yazen.Ghannam@amd.com; mchehab@kernel.org
>Cc: Jonathan Cameron <jonathan.cameron@huawei.com>; Linuxarm
><linuxarm@huawei.com>; rientjes@google.com; jiaqiyan@google.com;
>Jon.Grimm@amd.com; dave.hansen@linux.intel.com;
>naoya.horiguchi@nec.com; james.morse@arm.com; jthoughton@google.com;
>somasundaram.a@hpe.com; erdemaktas@google.com; pgonda@google.com;
>duenwen@google.com; gthelen@google.com;
>wschwartz@amperecomputing.com; wbs@os.amperecomputing.com;
>nifan.cxl@gmail.com; tanxiaofei <tanxiaofei@huawei.com>; Zengtao (B)
><prime.zeng@hisilicon.com>; Roberto Sassu <roberto.sassu@huawei.com>;
>kangkang.shen@futurewei.com; wanghuiqiang <wanghuiqiang@huawei.com>
>Subject: Re: [PATCH v13 2/2] ras: mem: Add ACPI RAS2 memory driver
>
>
>
>On 11/21/25 10:28 AM, shiju.jose@huawei.com wrote:
>> diff --git a/Documentation/edac/scrub.rst
>> b/Documentation/edac/scrub.rst index 2cfa74fa1ffd..737a10da224f 100644
>> --- a/Documentation/edac/scrub.rst
>> +++ b/Documentation/edac/scrub.rst
>> @@ -340,3 +340,61 @@ controller or platform when unexpectedly high error
>rates are detected.
>>
>>  Sysfs files for scrubbing are documented in
>> `Documentation/ABI/testing/sysfs-edac-ecs`
>> +
>> +3. ACPI RAS2 Hardware-based Memory Scrubbing
>> +
>> +3.1. On demand scrubbing for a specific memory region.
>> +
>> +3.1.1. Query the status of demand scrubbing
>> +
>> +# cat /sys/bus/edac/devices/acpi_ras_mem0/scrub0/enable_demand
>> +
>> +0
>> +
>> +3.1.2. Query what is device default/current scrub cycle setting.
>> +
>> +Applicable to both demand and background scrubbing.
>> +
>> +# cat
>> +/sys/bus/edac/devices/acpi_ras_mem0/scrub0/current_cycle_duration
>> +
>> +36000
>> +
>
>What units (above)?
In seconds.

>
>> +3.1.3. Query the range of device supported scrub cycle for a memory region.
>> +
>> +# cat /sys/bus/edac/devices/acpi_ras_mem0/scrub0/min_cycle_duration
>> +
>> +3600
>> +
>> +# cat /sys/bus/edac/devices/acpi_ras_mem0/scrub0/max_cycle_duration
>> +
>> +86400
>> +
>
>ditto.
Unit -  Seconds.
>
>> +3.1.4. Program scrubbing for the memory region in RAS2 device to
>> +repeat every
>> +43200 seconds (half a day).
>> +
>> +# echo 43200 >
>> +/sys/bus/edac/devices/acpi_ras_mem0/scrub0/current_cycle_duration
>> +
>> +3.1.5. Start 'demand scrubbing'.
>> +
>> +When a demand scrub is started, any background scrub currently in
>> +progress will be stopped and then automatically restarted once the
>> +demand scrub has completed.
>
>Will it restart where it left off or at the beginning?
In this case, presently kernel send 'START_PATROL_SCRUBBER ' command  to restart
the background scrubbing and thus restarts at the beginning unless I think firmware
has some implementation to detect this case and  'resume' background scrubbing
where it has stopped. Otherwise I think RAS2 may define some new commands to
'pause' and 'resume' scrubbing if that make sense so that kernel could send those
commands to the firmware for this case.
>
>> +
>> +# echo 1 > /sys/bus/edac/devices/acpi_ras_mem0/scrub0/enable_demand
>> +
>> +3.2. Background scrubbing the entire memory
>> +
>> +3.2.1. Query the status of background scrubbing.
>> +
>> +# cat /sys/bus/edac/devices/acpi_ras_mem0/scrub0/enable_background
>> +
>> +0
>> +
>> +3.2.2. Program background scrubbing for RAS2 device to repeat in
>> +every 21600 seconds (quarter of a day).
>> +
>> +# echo 21600 >
>> +/sys/bus/edac/devices/acpi_ras_mem0/scrub0/current_cycle_duration
>> +
>> +3.2.3. Start 'background scrubbing'.
>> +
>> +# echo 1 >
>> +/sys/bus/edac/devices/acpi_ras_mem0/scrub0/enable_background
>
>--
>~Randy

Thanks,
Shiju


      reply	other threads:[~2025-11-24 10:00 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-21 18:28 [PATCH v13 0/2] ACPI: Add support for ACPI RAS2 feature table shiju.jose
2025-11-21 18:28 ` [PATCH v13 1/2] ACPI:RAS2: Add driver for the " shiju.jose
2025-11-22  5:18   ` Randy Dunlap
2025-11-25  7:36   ` Borislav Petkov
2025-11-25 13:28     ` Shiju Jose
2025-12-31 13:15       ` Borislav Petkov
2026-01-05 18:13         ` Shiju Jose
2025-12-08 16:29     ` Jonathan Cameron
2025-12-31 16:07       ` Borislav Petkov
2025-11-21 18:28 ` [PATCH v13 2/2] ras: mem: Add ACPI RAS2 memory driver shiju.jose
2025-11-22  5:18   ` Randy Dunlap
2025-11-24  9:29     ` Shiju Jose
2025-11-22  5:22   ` Randy Dunlap
2025-11-24 10:00     ` Shiju Jose [this message]

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=78ee1bf7cfe34909bf09b429e81e63a7@huawei.com \
    --to=shiju.jose@huawei.com \
    --cc=Jon.Grimm@amd.com \
    --cc=Yazen.Ghannam@amd.com \
    --cc=akpm@linux-foundation.org \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=dferguson@amperecomputing.com \
    --cc=duenwen@google.com \
    --cc=erdemaktas@google.com \
    --cc=gthelen@google.com \
    --cc=james.morse@arm.com \
    --cc=jiaqiyan@google.com \
    --cc=jonathan.cameron@huawei.com \
    --cc=jthoughton@google.com \
    --cc=kangkang.shen@futurewei.com \
    --cc=lenb@kernel.org \
    --cc=leo.duran@amd.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linuxarm@huawei.com \
    --cc=mchehab@kernel.org \
    --cc=naoya.horiguchi@nec.com \
    --cc=nifan.cxl@gmail.com \
    --cc=pgonda@google.com \
    --cc=prime.zeng@hisilicon.com \
    --cc=rafael@kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=rientjes@google.com \
    --cc=roberto.sassu@huawei.com \
    --cc=rppt@kernel.org \
    --cc=somasundaram.a@hpe.com \
    --cc=tanxiaofei@huawei.com \
    --cc=tony.luck@intel.com \
    --cc=wanghuiqiang@huawei.com \
    --cc=wbs@os.amperecomputing.com \
    --cc=wschwartz@amperecomputing.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.