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 BBEC7C04FFE for ; Mon, 20 May 2024 11:59:09 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C12076B0082; Mon, 20 May 2024 07:59:08 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BE9EB6B0083; Mon, 20 May 2024 07:59:08 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A8ADE6B0085; Mon, 20 May 2024 07:59:08 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 879F66B0082 for ; Mon, 20 May 2024 07:59:08 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 0FB8A140D47 for ; Mon, 20 May 2024 11:59:08 +0000 (UTC) X-FDA: 82138628376.19.7387A03 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by imf17.hostedemail.com (Postfix) with ESMTP id 96BAC40022 for ; Mon, 20 May 2024 11:59:03 +0000 (UTC) Authentication-Results: imf17.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf17.hostedemail.com: domain of jonathan.cameron@huawei.com designates 185.176.79.56 as permitted sender) smtp.mailfrom=jonathan.cameron@huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1716206344; 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=p13Y4rlP7vMqePN/ynERjiTzBIV3GUMFLlsjyzfVO3M=; b=H0mI6XrwF7ZdEr95oGKW17c1pd5zhcVX7C4iBKkm0wNYwxNN2kldB4I9ij9qQZgHmo3d7F Kgw3TU/Ek+txd1leukJ8xXMZNvwT+SzUUb2N2HCazmFM8ua0XzMiZG6LSlZQ1TaWepWmyD oVUSio1vamRajAs1yo5ExItSyRtfE7Q= 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 jonathan.cameron@huawei.com designates 185.176.79.56 as permitted sender) smtp.mailfrom=jonathan.cameron@huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1716206344; a=rsa-sha256; cv=none; b=J/hP/3UOiBoacfXKOrUuHZ6o56i/mgBZkn0RRBBYhAulFsOX7gGOE1EV4GkbpUHhVCRo8x fVVkZPdsq3iu/kI0bsUnBzTv0SYuOGZ8k9czjTPEW1dDb3fC72BeUwV8GxqCA5cP/l+A7p 4l5yf/xRR0fxCFuPeexaQ4cY1PHVe5g= Received: from mail.maildlp.com (unknown [172.18.186.31]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4Vjbby5TsBz6JBPr; Mon, 20 May 2024 19:55:26 +0800 (CST) Received: from lhrpeml500005.china.huawei.com (unknown [7.191.163.240]) by mail.maildlp.com (Postfix) with ESMTPS id 3287B140A36; Mon, 20 May 2024 19:59:00 +0800 (CST) Received: from localhost (10.202.227.76) by lhrpeml500005.china.huawei.com (7.191.163.240) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Mon, 20 May 2024 12:58:59 +0100 Date: Mon, 20 May 2024 12:58:57 +0100 From: Jonathan Cameron To: Shiju Jose CC: Borislav Petkov , Dan Williams , "linux-cxl@vger.kernel.org" , "linux-acpi@vger.kernel.org" , "linux-mm@kvack.org" , "dave@stgolabs.net" , "dave.jiang@intel.com" , "alison.schofield@intel.com" , "vishal.l.verma@intel.com" , "ira.weiny@intel.com" , "linux-edac@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "david@redhat.com" , "Vilas.Sridharan@amd.com" , "leo.duran@amd.com" , "Yazen.Ghannam@amd.com" , "rientjes@google.com" , "jiaqiyan@google.com" , "tony.luck@intel.com" , "Jon.Grimm@amd.com" , "dave.hansen@linux.intel.com" , "rafael@kernel.org" , "lenb@kernel.org" , "naoya.horiguchi@nec.com" , "james.morse@arm.com" , "jthoughton@google.com" , "somasundaram.a@hpe.com" , "erdemaktas@google.com" , "pgonda@google.com" , "duenwen@google.com" , "mike.malvestuto@intel.com" , "gthelen@google.com" , "wschwartz@amperecomputing.com" , "dferguson@amperecomputing.com" , "wbs@os.amperecomputing.com" , "nifan.cxl@gmail.com" , tanxiaofei , "Zengtao (B)" , "kangkang.shen@futurewei.com" , wanghuiqiang , Linuxarm , "Greg Kroah-Hartman" , Jean Delvare , Guenter Roeck , Dmitry Torokhov Subject: Re: [RFC PATCH v8 01/10] ras: scrub: Add scrub subsystem Message-ID: <20240520125857.00007641@Huawei.com> In-Reply-To: <6645f0738ead48a79f1baf753fc709c6@huawei.com> References: <4ceb38897d854cc095fca1220d49a4d2@huawei.com> <20240508192546.GHZjvRuvtu0XSJbkmz@fat_crate.local> <20240509101939.0000263a@Huawei.com> <20240509200306.GAZj0r-h5Tnc0ecIOz@fat_crate.local> <663d3e58a0f73_1c0a1929487@dwillia2-xfh.jf.intel.com.notmuch> <20240509215147.GBZj1Fc06Ieg8EQfnR@fat_crate.local> <663d55515a2d9_db82d2941e@dwillia2-xfh.jf.intel.com.notmuch> <20240510092511.GBZj3n9ye_BCSepFZy@fat_crate.local> <663e55c59d9d_3d7b429475@dwillia2-mobl3.amr.corp.intel.com.notmuch> <20240511101705.GAZj9FoVbThp7JUK16@fat_crate.local> <6645f0738ead48a79f1baf753fc709c6@huawei.com> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 4.1.0 (GTK 3.24.33; x86_64-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.202.227.76] X-ClientProxiedBy: lhrpeml100005.china.huawei.com (7.191.160.25) To lhrpeml500005.china.huawei.com (7.191.163.240) X-Stat-Signature: qn5ruxpknbu1nq9dqrznkpftp8kz7bgy X-Rspamd-Queue-Id: 96BAC40022 X-Rspam-User: X-Rspamd-Server: rspam10 X-HE-Tag: 1716206343-327041 X-HE-Meta: U2FsdGVkX1/zeZ9GfJUYIOiAl9oKA82XNdQG5K9JUW6ElZgcdbRsEH/vajk5OYZ7UE57m146iylMO2NFXyRroeT1H5MDhXuwxt6xDQaaFA5UzpJwjzr6qGYFAQMPktrg3plJYfLoM3N/P3vgjwm+EvuNhDOAAKzz4p6cuR912orF2K30FYkWxEScHrkJBSVn8FbvBjwemIABwVlStoS9eubBfZNahveJjvhTmOfZqxflurC9Sq985oOVGkl1s5hCVLq2G4Ne0l6ZzjXE+DpLS/Akw3bK8S8tky8IMEcLQ8Wp+eUa6e0sqT9T4hG/eLWmK6hnWcCg7sF2KWfRmirhhUfCGyVugNBcYkmc1agthhxiWkpo1L3bgULCKobzJVhSRKUVXgUlfebmvsHk4m+fk5otN6SSzEr0KKAQX13/URR6X6Opv74u2cKTfwH9lv+4e02nSbzQ9Kt+K3qSglX+9qTOxAwY0sHti+ZWGlymsmkWF0L5BNp9/S9c1OoWB0WR6CXxSAzfDx9WIFimLJ2N47SkqB6/2WZBmV1faLoQe035y8d+QgnDEqIfgOCp+rgrhQPvn7xTL3wFNONEC0aujwbPAvhV8SwjMSdwAfqegWUn1unAXkgW0UcCCfcsMGqWjo/HaP+1eKODpQpj1WLCxQXJjy/xQTOtkcIshH/y4ycDxwNS2fNZ9BaWozL4SB7oWP+NzCYyDCqLLIrwWMNvndXSpVkai+HyECKNbr/iIjk0yqPCDBklpLX5KhedJe0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A2EbjrEIBI6MWkoPKhINM6WMZs/KewkZ95Q308qRAqZ87jTslKzohRNNCoDDpA8QVEfeIfEOaX3PYfHNDtuv8MkUv6DXFk/PT2zYyScU5iV1C6FBA1 wJp5hOTr vX3RR7sFJ54wFe6wPIyrM6uMKKvqa5m4w0qrxQXtbuqQmLniXJWmPA/GwOPUF1yJW7dD/W/byvirkal8ZsBU8Kgy/S2GWCBZIimXC4KJ3kNsbsrHZpBGWzdN0jSaoAzsp+dK+ZBgc3DmTSoWMOmasgzZpDbwWRut 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: On Mon, 20 May 2024 11:54:50 +0100 Shiju Jose wrote: > >-----Original Message----- > >From: Borislav Petkov > >Sent: 11 May 2024 11:17 > >To: Dan Williams > >Cc: Jonathan Cameron ; Shiju Jose > >; linux-cxl@vger.kernel.org; linux- > >acpi@vger.kernel.org; linux-mm@kvack.org; dave@stgolabs.net; > >dave.jiang@intel.com; alison.schofield@intel.com; vishal.l.verma@intel.com; > >ira.weiny@intel.com; linux-edac@vger.kernel.org; linux- > >kernel@vger.kernel.org; david@redhat.com; Vilas.Sridharan@amd.com; > >leo.duran@amd.com; Yazen.Ghannam@amd.com; rientjes@google.com; > >jiaqiyan@google.com; tony.luck@intel.com; Jon.Grimm@amd.com; > >dave.hansen@linux.intel.com; rafael@kernel.org; lenb@kernel.org; > >naoya.horiguchi@nec.com; james.morse@arm.com; jthoughton@google.com; > >somasundaram.a@hpe.com; erdemaktas@google.com; pgonda@google.com; > >duenwen@google.com; mike.malvestuto@intel.com; gthelen@google.com; > >wschwartz@amperecomputing.com; dferguson@amperecomputing.com; > >wbs@os.amperecomputing.com; nifan.cxl@gmail.com; tanxiaofei > >; Zengtao (B) ; > >kangkang.shen@futurewei.com; wanghuiqiang ; > >Linuxarm ; Greg Kroah-Hartman > >; Jean Delvare ; Guenter > >Roeck ; Dmitry Torokhov > >Subject: Re: [RFC PATCH v8 01/10] ras: scrub: Add scrub subsystem > > > >On Fri, May 10, 2024 at 10:13:41AM -0700, Dan Williams wrote: > >> In fact this question matches my reaction to the last posting [1], and > >> led to a much improved cover letter and the "Comparison of scrubbing > >> features". To your point there are scrub capabilities already in the > >> kernel and we would need to make a decision about what to do about them. > > > >The answer to that question is whether this new userspace usage is going to > >want to control those too. > > > >So > > > >"Use case of scrub control feature" > > > >from the cover letter is giving two short sentences about what one would do but > >I'm still meh. A whole subsystem needing a bunch of effort would need a lot > >more justification. > > > >So can anyone please elaborate more on the use cases and why this new thing is > >needed? > > Following are some of the use cases of generic scrub control subsystem as given in the cover letter. > Request please add any other use cases, which I missed. > > 1. There are several types of interfaces to HW memory scrubbers identified such as ACPI NVDIMM ARS(Address Range Scrub), CXL memory device patrol scrub, CXL DDR5 ECS, ACPI RAS2 memory scrubbing features and software based memory scrubber(discussed in the community Reference [5] in the cover letter). Also some scrubbers support controlling (background) patrol scrubbing(ACPI RAS2, CXL) and/or on-demand scrubbing(ACPI RAS2, ACPI ARS). However the scrub controls varies between memory scrubbers. Thus there is a need for a standard generic ABI and sysfs scrub controls for the userspace tools, which control HW and SW scrubbers in the system, for the easiness of use. > 2. Scrub controls in user space allow the user space tool to disable and enable the feature in case disabling of the background patrol scrubbing and changing the scrub rate are needed for other purposes such as performance-aware operations which requires the background operations to be turned off or reduced. > 3. Allows to perform on-demand scrubbing for specific address range if supported by the scrubber. > 4. User space tools controls scrub the memory DIMMs regularly at a configurable scrub rate using the sysfs scrub controls discussed help, > - to detect uncorrectable memory errors early before user accessing memory, which helps to recover the detected memory errors. > - reduces the chance of a correctable error becoming uncorrectable. Just to add one more reason a user space interface is needed. 5. Policy control for hotplugged memory. There is not necessarily a system wide bios or similar in the loop to control the scrub settings on a CXL device that wasn't there at boot. What that setting should be is a policy decision as we are trading of reliability vs performance - hence it should be in control of userspace. As such, 'an' interface is needed. Seems more sensible to try and unify it with other similar interfaces than spin yet another one. > > Regards, > Shiju >