Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp2348083rdb; Fri, 8 Dec 2023 05:48:54 -0800 (PST) X-Google-Smtp-Source: AGHT+IGgm/0qzABVzrx2zhMbdjdBwOPkjAJdYkcSBoe4QXlS8R9yuCEVCZqdQGfI1RmGt3rsm6sn X-Received: by 2002:a05:6a20:12c3:b0:18f:97c:8a3c with SMTP id v3-20020a056a2012c300b0018f097c8a3cmr34714pzg.103.1702043333934; Fri, 08 Dec 2023 05:48:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702043333; cv=none; d=google.com; s=arc-20160816; b=XQOxvNLQzFTRcjIXj+7WUuM4xKoLbzlNe9XV6zGyBMoRZDC3qmPBO6SHqRO3/3p1+D x/JKjO8yQCqAKJm7kuObuPAQfX2QTx/O1XuyoJePsJrMSyUklnHF4/zX/MLL7VKIHw2D X7Op7UOXZtGasbXncZd8WGi+TCZmbg/R25Cg5phhfjfarZoQWX9poe9zail1IVbENNnc 5Agd2X6Moz4mYL5IaNNNu1ofrUVxQctVZkgT6AHeNPVg0m+n4i8e/jHNAy0u44f4USZX imq5VML878aMERFT1IK7JXwn+PH21m6n0A4J0dz6qjvsXa0NnSq8LLUbZBORWOHsONf7 3xrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from; bh=iXl9ofE9oPoQb2LSeRaxTxLl8/aGxcHYQIuzVrg5QQg=; fh=X85/qWLktP7YbAC/jJA+Rq6hmtZjVjRGR8Yi5kdCPiU=; b=kdUTFZSkHSA+gQpMPneudhTGfj8rX3WqwxqBGKSzDarYjTM3GITBKDjvgt5P86vo2J CIuN/Cvr7KcfV6pjy1xVAYrwuYW9ohr4e7gsdaqDnMp3hvw7assbHEG+cTi5tY/CfsAx Hgawv51JiIHxKIfmUKrOdSk8sIUa8JJxcThcxjtWEZXU36stMVVcYx/yeuRfT0+YNvSX ZL5h0XXms3bHsHncwySu3X7Ccl2cCZVw65SA6ueANKNRAgwrOjmiYlzNXn5VgFC4smTG XA0q10hGPOZU1/KXjsdhODUYkGq5C+v0sAuhVcvPLIMyd4HduaQ0pvCRIEwlGJpIb1J6 Q1fg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id q6-20020a655246000000b005b92842d469si1606258pgp.62.2023.12.08.05.48.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Dec 2023 05:48:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 984E380BB6F8; Fri, 8 Dec 2023 05:48:48 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1573811AbjLHNs3 convert rfc822-to-8bit (ORCPT + 99 others); Fri, 8 Dec 2023 08:48:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34526 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233489AbjLHNs1 (ORCPT ); Fri, 8 Dec 2023 08:48:27 -0500 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3157D172B; Fri, 8 Dec 2023 05:48:33 -0800 (PST) Received: from mail.maildlp.com (unknown [172.18.186.216]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4SmssF151cz6JB1X; Fri, 8 Dec 2023 21:47:45 +0800 (CST) Received: from lhrpeml500002.china.huawei.com (unknown [7.191.160.78]) by mail.maildlp.com (Postfix) with ESMTPS id 9394D14011D; Fri, 8 Dec 2023 21:48:30 +0800 (CST) Received: from lhrpeml500006.china.huawei.com (7.191.161.198) by lhrpeml500002.china.huawei.com (7.191.160.78) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Fri, 8 Dec 2023 13:48:30 +0000 Received: from lhrpeml500006.china.huawei.com ([7.191.161.198]) by lhrpeml500006.china.huawei.com ([7.191.161.198]) with mapi id 15.01.2507.035; Fri, 8 Dec 2023 13:48:30 +0000 From: Shiju Jose To: Dan Williams , "linux-cxl@vger.kernel.org" , "linux-mm@kvack.org" , "dave@stgolabs.net" , Jonathan Cameron , "dave.jiang@intel.com" , "alison.schofield@intel.com" , "vishal.l.verma@intel.com" , "ira.weiny@intel.com" CC: "linux-acpi@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" , tanxiaofei , "Zengtao (B)" , "kangkang.shen@futurewei.com" , wanghuiqiang , Linuxarm Subject: RE: [PATCH v4 00/11] cxl: Add support for CXL feature commands, CXL device patrol scrub control and DDR5 ECS control features Thread-Topic: [PATCH v4 00/11] cxl: Add support for CXL feature commands, CXL device patrol scrub control and DDR5 ECS control features Thread-Index: AQHaI8KwgMGD3E1NJkm1EO0u0hTVFbCcsBMAgAJ2I3A= Date: Fri, 8 Dec 2023 13:48:30 +0000 Message-ID: <9bc4b5fac46d4f37b675de4e0f65931b@huawei.com> References: <20231130192314.1220-1-shiju.jose@huawei.com> <6570cdbaa96e0_45e01294e0@dwillia2-xfh.jf.intel.com.notmuch> In-Reply-To: <6570cdbaa96e0_45e01294e0@dwillia2-xfh.jf.intel.com.notmuch> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.48.159.242] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Fri, 08 Dec 2023 05:48:48 -0800 (PST) Hi Dan, Thanks for the feedbacks. >-----Original Message----- >From: Dan Williams >Sent: 06 December 2023 19:39 >To: Shiju Jose ; linux-cxl@vger.kernel.org; linux- >mm@kvack.org; dave@stgolabs.net; Jonathan Cameron >; dave.jiang@intel.com; >alison.schofield@intel.com; vishal.l.verma@intel.com; ira.weiny@intel.com; >dan.j.williams@intel.com >Cc: linux-acpi@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; >tanxiaofei ; Zengtao (B) ; >kangkang.shen@futurewei.com; wanghuiqiang ; >Linuxarm ; Shiju Jose >Subject: RE: [PATCH v4 00/11] cxl: Add support for CXL feature commands, CXL >device patrol scrub control and DDR5 ECS control features > >Hi Shiju, > >I have some general feedback at this point before digging too deep into the >details: > >shiju.jose@ wrote: >> From: Shiju Jose >> >> 1. Add support for CXL feature mailbox commands. >> 2. Add CXL device scrub driver supporting patrol scrub control and >> DDR5 ECS control features. >> 3. Add scrub driver supports configuring memory scrubs in the system. >> 4. Add scrub attributes for DDR5 ECS control to the memory scrub driver. > >For a new a subsystem that is meant to generically abstract a "memory scrub" >facility the "DDR5 ECS" naming has too much precision. How much of this >interface is DDR5 ECS specific and how much of it is applicable to a theoretical >DDR6 scrub implementation? > >My primary reaction is to boil down this interface so that only generic scrub >details are visible in the ABI, and DDR5 specifics are invisible in the sysfs ABI. Sure. I will check this. > >For example the Linux NVDIMM subsystem has an address-range-scrub facility >that is independent of the specific memory technology scrub mechanism. That >one is based on ACPI NFIT, but I realize you also looked at enabling the ACPI >RASF scrub interface. It would be useful if this patchset could plausibly enable >one non-CXL scrubber along with the CXL one. Sure. I will do this. I will add ACPI RASF scrub patches to this patch set. > >> 5. Register CXL device patrol scrub and ECS with scrub control driver. >> 6. Add documentation for common attributes in the scrub configure driver. > >Going forward, please include the Documentation in the patch that adds the new >ABI, it improves the readability / story-telling of the patches. >It also makes it easier to analyze which code is needed for which ABI, and >whether a given ABI is justified. I will do. > >The regionY nomenclature in the sysfs ABI looks like a potential opportunity to >align with the "memregion" id scheme. See all the callers of memregion_alloc() >where those are tagging device-backed physical address ranges with a common >id namespace. It would be great if the memory-scrub ABI reported failures in >terms of region-ids that correlate with CXL, DAX, or NVDIMM regions. For the CXL DDR5 ECS feature, presently the regionY corresponds to the IDs of the memory media FRUs (1 to N), defined in the DDR5 ECS Control Feature tables Table 8-210 and Table 8-211. > >> 7. Add documentation for CXL memory device scrub control attributes. > >Do the CXL specifics need to be in the ABI? One thing I missed was how the Ok. I will remove. Should these DDR5 ECS specifics consider as generic and be part of the memory scrub ABI? >series of log entries are conveyed. For CXL in contrast to what NVDIMM did for >address range scrub is that CXL makes use of trace-events to emit log records. >That allows the sysfs ABI to remain relatively simple, but the various trace- >events can get into more protocol specific details. For example, see >cxl_trigger_poison_list() and >trace_cxl_poison() as a way to genericly trigger the listing of a flow of device- >specific details. In other words put the DDR5 ECS specifics in the trace-event, not >the sysfs ABI if possible. Did you mean remove the readable attributes for DDR5 ECS from the sysfs? For example the "ECS Threshold Count per Gb of Memory Cells" and "Codeword/Row Count Mode" in the Table 8-78 DDR5 ECS log of section 8.2.9.5.2.4 DDR5 Error Check Scrub (ECS) Log. > >Lastly, dynamically defined sysfs groups are less palatable than statically >defined. See cxl_region_target_visible() for a scheme for statically defining a >runtime variable number of attributes. >Specifically I would like to see a way to define this new subsystem without >scrub_create_attrs() and all the runtime attribute definition. > Sure. I will check this. >Overall, I like the general approach to define a common subsystem for this, and >get off the treadmill of reinventing custom scrub interfaces per bus, but that >also requires that it be generic enough to subsume a number of those per-bus- >scrub-types. This is the challenging part to make the scrub interface generic because the scrub control varies between the scrub types, for example as seen in the CXL ECS. Thanks, Shiju