RE: [PATCH v20 02/15] EDAC: Add scrub control feature

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>-----Original Message-----
>From: Fan Ni <nifan.cxl@xxxxxxxxx>
>Sent: 13 February 2025 21:35
>To: Shiju Jose <shiju.jose@xxxxxxxxxx>
>Cc: linux-edac@xxxxxxxxxxxxxxx; linux-cxl@xxxxxxxxxxxxxxx; linux-
>acpi@xxxxxxxxxxxxxxx; linux-mm@xxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx;
>linux-doc@xxxxxxxxxxxxxxx; bp@xxxxxxxxx; tony.luck@xxxxxxxxx;
>rafael@xxxxxxxxxx; lenb@xxxxxxxxxx; mchehab@xxxxxxxxxx;
>dan.j.williams@xxxxxxxxx; dave@xxxxxxxxxxxx; Jonathan Cameron
><jonathan.cameron@xxxxxxxxxx>; dave.jiang@xxxxxxxxx;
>alison.schofield@xxxxxxxxx; vishal.l.verma@xxxxxxxxx; ira.weiny@xxxxxxxxx;
>david@xxxxxxxxxx; Vilas.Sridharan@xxxxxxx; leo.duran@xxxxxxx;
>Yazen.Ghannam@xxxxxxx; rientjes@xxxxxxxxxx; jiaqiyan@xxxxxxxxxx;
>Jon.Grimm@xxxxxxx; dave.hansen@xxxxxxxxxxxxxxx;
>naoya.horiguchi@xxxxxxx; james.morse@xxxxxxx; jthoughton@xxxxxxxxxx;
>somasundaram.a@xxxxxxx; erdemaktas@xxxxxxxxxx; pgonda@xxxxxxxxxx;
>duenwen@xxxxxxxxxx; gthelen@xxxxxxxxxx;
>wschwartz@xxxxxxxxxxxxxxxxxxx; dferguson@xxxxxxxxxxxxxxxxxxx;
>wbs@xxxxxxxxxxxxxxxxxxxxxx; nifan.cxl@xxxxxxxxx; tanxiaofei
><tanxiaofei@xxxxxxxxxx>; Zengtao (B) <prime.zeng@xxxxxxxxxxxxx>; Roberto
>Sassu <roberto.sassu@xxxxxxxxxx>; kangkang.shen@xxxxxxxxxxxxx;
>wanghuiqiang <wanghuiqiang@xxxxxxxxxx>; Linuxarm
><linuxarm@xxxxxxxxxx>
>Subject: Re: [PATCH v20 02/15] EDAC: Add scrub control feature
>
>On Wed, Feb 12, 2025 at 02:36:40PM +0000, shiju.jose@xxxxxxxxxx wrote:
>> From: Shiju Jose <shiju.jose@xxxxxxxxxx>
>>
>> Add a generic EDAC 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 EDAC scrub driver and
>> exposes the sysfs scrub control attributes for a scrub 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
>> sysfs scrub attribute nodes are only present if the client driver has
>> implemented the corresponding attribute callback function and passed
>> the
>> operations(ops) to the EDAC device driver during registration.
>>
>> Co-developed-by: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>
>> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>
>> Tested-by: Daniel Ferguson <danielf@xxxxxxxxxxxxxxxxxxxxxx>
>> Signed-off-by: Shiju Jose <shiju.jose@xxxxxxxxxx>
>> ---
>>  Documentation/ABI/testing/sysfs-edac-scrub |  69 ++++++
>>  Documentation/edac/features.rst            |   6 +
>>  Documentation/edac/index.rst               |   1 +
>>  Documentation/edac/scrub.rst               | 259 +++++++++++++++++++++
>>  drivers/edac/Kconfig                       |   9 +
>>  drivers/edac/Makefile                      |   2 +
>>  drivers/edac/edac_device.c                 |  41 +++-
>>  drivers/edac/scrub.c                       | 209 +++++++++++++++++
>>  include/linux/edac.h                       |  43 ++++
>>  9 files changed, 635 insertions(+), 4 deletions(-)  create mode
>> 100644 Documentation/ABI/testing/sysfs-edac-scrub
>>  create mode 100644 Documentation/edac/scrub.rst  create mode 100755
>> drivers/edac/scrub.c
>
>LGTM.
>
>Just one question, for min/max/current_cycle_duration attributes, is there a
>reason why seconds are used instead of hours directly as mentioned in the spec.
>That confused me a little bit when I tested to modify the current_cycle_duration
>with some value not multiple of 3600 and found the value read back is not the
>same as that just written.
>
Hi Fan,

Thanks for reviewing and testing.
The unit for the scrub cycle attributes has been chosen as a small unit, seconds, 
since the EDAC scrub interface is a common interface and the unit may vary across 
various hardware scrub interfaces.
In the CXL scrub control feature, the scrub cycle is represented in hours. Therefore, 
the scrub cycle is internally converted to hours, and the rounded value in hours, 
which is set in the device, is returned when read back.

>With that in mind,	
>
>Tested-by: Fan Ni <fan.ni@xxxxxxxxxxx>
>
>
>>
[...]
>> --
>> 2.43.0
>>

Thanks,
Shiju





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux