From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id F0EFDC02198 for ; Fri, 14 Feb 2025 10:49:53 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6A7CF280004; Fri, 14 Feb 2025 05:49:53 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 63243280001; Fri, 14 Feb 2025 05:49:53 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4AA0E280004; Fri, 14 Feb 2025 05:49:53 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 2D2E6280001 for ; Fri, 14 Feb 2025 05:49:53 -0500 (EST) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 9C16D41720 for ; Fri, 14 Feb 2025 10:49:52 +0000 (UTC) X-FDA: 83118229824.01.0148D88 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by imf17.hostedemail.com (Postfix) with ESMTP id 6E9E840012 for ; Fri, 14 Feb 2025 10:49:49 +0000 (UTC) Authentication-Results: imf17.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf17.hostedemail.com: domain of shiju.jose@huawei.com designates 185.176.79.56 as permitted sender) smtp.mailfrom=shiju.jose@huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1739530190; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+b+hHR17wE2QRElTpCBCQQ5haHh1pDsxmtPEZLKpbS0=; b=cQSeWWhsBfJKgCxJ2B+1zw1Ddn7TAuodXRGLsToSLr4b1Miyx9y4LLz+3+lunDLcsL1s+f vIKCPOWdoW0oiXUoYAjjRRQzb6Pc+rsFjKxf0WeAW4UDNnVpPfeK4Hd0nLsrksEXy9A/An 4ol8dl9kByKR9v88+gOSB6jsjXQhnyE= ARC-Authentication-Results: i=1; imf17.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf17.hostedemail.com: domain of shiju.jose@huawei.com designates 185.176.79.56 as permitted sender) smtp.mailfrom=shiju.jose@huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1739530190; a=rsa-sha256; cv=none; b=lEd5HJ1IT2uhOE+hrjxheLAI0xtRP//4kklnZR0oZWJqJBITdgkZxGXx82JRa6jUKg5l5d RTCXeL/5bYmVWIsye6qNIlLkMkLwkwMe2BzTJ+pMDLFQ0IaAdvJoYsh97KgqoNnYiBvABU hL2Re8RURH6+9+T55uJqXfg9cNcgyUs= Received: from mail.maildlp.com (unknown [172.18.186.31]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4YvTHz4wLdz6L4t9; Fri, 14 Feb 2025 18:46:39 +0800 (CST) Received: from frapeml100007.china.huawei.com (unknown [7.182.85.133]) by mail.maildlp.com (Postfix) with ESMTPS id E1DB31400DA; Fri, 14 Feb 2025 18:49:45 +0800 (CST) Received: from frapeml500007.china.huawei.com (7.182.85.172) by frapeml100007.china.huawei.com (7.182.85.133) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Fri, 14 Feb 2025 11:49:45 +0100 Received: from frapeml500007.china.huawei.com ([7.182.85.172]) by frapeml500007.china.huawei.com ([7.182.85.172]) with mapi id 15.01.2507.039; Fri, 14 Feb 2025 11:49:45 +0100 From: Shiju Jose To: Fan Ni CC: "linux-edac@vger.kernel.org" , "linux-cxl@vger.kernel.org" , "linux-acpi@vger.kernel.org" , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , "linux-doc@vger.kernel.org" , "bp@alien8.de" , "tony.luck@intel.com" , "rafael@kernel.org" , "lenb@kernel.org" , "mchehab@kernel.org" , "dan.j.williams@intel.com" , "dave@stgolabs.net" , "Jonathan Cameron" , "dave.jiang@intel.com" , "alison.schofield@intel.com" , "vishal.l.verma@intel.com" , "ira.weiny@intel.com" , "david@redhat.com" , "Vilas.Sridharan@amd.com" , "leo.duran@amd.com" , "Yazen.Ghannam@amd.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" , "dferguson@amperecomputing.com" , "wbs@os.amperecomputing.com" , tanxiaofei , "Zengtao (B)" , "Roberto Sassu" , "kangkang.shen@futurewei.com" , wanghuiqiang , Linuxarm Subject: RE: [PATCH v20 02/15] EDAC: Add scrub control feature Thread-Topic: [PATCH v20 02/15] EDAC: Add scrub control feature Thread-Index: AQHbfVudPqq/NHwN4UqlQ2GJSWClwrNFsryAgADmw2A= Date: Fri, 14 Feb 2025 10:49:45 +0000 Message-ID: <4bf20362774e4a7cb9387f97f43fff9c@huawei.com> References: <20250212143654.1893-1-shiju.jose@huawei.com> <20250212143654.1893-3-shiju.jose@huawei.com> <67ae6587.170a0220.2d3544.9687@mx.google.com> In-Reply-To: <67ae6587.170a0220.2d3544.9687@mx.google.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.195.247.58] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Rspam-User: X-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MOODSMraT ab15Icpw 7a/53RTS56nrPB7Zi29TcIRzfTcuOrFcVqRtxPE2FOZbTiZbUEJcNWOxIgLPw1dRdqJDeCCSOsFdrcbLK52kYa9dZmvcq0vXjkQbkyawZD8ATMxmKjtwYfpuMBT2xXAkkYRVyly5aoD2izeLzUmSB136h1QwPw5OI2BZDfbFcUDWd87LO+o1lWkAoltm3ktdwXrZYSwCMPKg8PSX71hqhjgI21bodUd8V0Vn34ULtjQQ72glae+UA9ufe5yDr9LjHCmmt/4TV0izhGLnVrrOtJaaS8cNl9x7u4UljW3YRKCZdHXCAgtgjRAd6DnwO4aaGoovGWW6U9rZFVYmaUkzHaPvj6gprQLNYhJMOj0fnQxuoJurN6Cwy+Pgk+9cSJuPTmM6bAI8XfwnpTdRuSfHweqcRjI08uu0IZPMfU6QiedXQCZZOg23xsnGxqHZLBM2b9dACLbsI3UZ8b9idTzz8sAd+xEG1XnzV1J+S9VTUtpVL0X6TpDQoRKfSmbDGhpB1oQM53n1D1S1jMvaIilvcxTMRKCdYh7gYGal6TY8DpgpHw/qDVr+CcC8hqV99VmBvXAr0QVflngbPiNhhNgl7Ydx2qiA/XpimRFGfLIwcXNw71r6rpn4EM31KoPqYpr98d+g3h8KvRm56+IMcvdCSx7sslNS1praCgLHgSER8fYqzxlYaEC3uSV1LUxbi6YxyW5TUTIV6iuRk2JnvaK33ys7/KXMkvKsVJ8xWLlRZlzo+ajdM6agw6UGXxld3v5OinFbr+qPjoOyYvxcoM6jaPuiNTIGVi30c3UjV+jH8+RQpSKpRP/RsAdYlBERa79D9/EmgvJhVmBeyKd3a6hE0c7w+/IE+AMqu6WkrcKO+BLPZjUw= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: >-----Original Message----- >From: Fan Ni >Sent: 13 February 2025 21:35 >To: Shiju Jose >Cc: linux-edac@vger.kernel.org; linux-cxl@vger.kernel.org; linux- >acpi@vger.kernel.org; linux-mm@kvack.org; linux-kernel@vger.kernel.org; >linux-doc@vger.kernel.org; bp@alien8.de; tony.luck@intel.com; >rafael@kernel.org; lenb@kernel.org; mchehab@kernel.org; >dan.j.williams@intel.com; dave@stgolabs.net; Jonathan Cameron >; dave.jiang@intel.com; >alison.schofield@intel.com; vishal.l.verma@intel.com; ira.weiny@intel.com; >david@redhat.com; Vilas.Sridharan@amd.com; leo.duran@amd.com; >Yazen.Ghannam@amd.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; dferguson@amperecomputing.com; >wbs@os.amperecomputing.com; nifan.cxl@gmail.com; tanxiaofei >; Zengtao (B) ; Roberto >Sassu ; kangkang.shen@futurewei.com; >wanghuiqiang ; Linuxarm > >Subject: Re: [PATCH v20 02/15] EDAC: Add scrub control feature > >On Wed, Feb 12, 2025 at 02:36:40PM +0000, shiju.jose@huawei.com wrote: >> From: Shiju Jose >> >> Add a generic EDAC scrub control to manage memory scrubbers in the syste= m. >> 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//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 >> Signed-off-by: Jonathan Cameron >> Tested-by: Daniel Ferguson >> Signed-off-by: Shiju Jose >> --- >> 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_du= ration >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, se= conds,=20 since the EDAC scrub interface is a common interface and the unit may vary = across=20 various hardware scrub interfaces. In the CXL scrub control feature, the scrub cycle is represented in hours. = Therefore,=20 the scrub cycle is internally converted to hours, and the rounded value in = hours,=20 which is set in the device, is returned when read back. >With that in mind,=09 > >Tested-by: Fan Ni > > >> [...] >> -- >> 2.43.0 >> Thanks, Shiju