From patchwork Thu Mar 20 18:04:39 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Shiju Jose X-Patchwork-Id: 14024290 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 E4378C35FFF for ; Thu, 20 Mar 2025 18:05:40 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 15247280009; Thu, 20 Mar 2025 14:05:38 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0B8BF280008; Thu, 20 Mar 2025 14:05:38 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E25B3280009; Thu, 20 Mar 2025 14:05:37 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id C24BC280008 for ; Thu, 20 Mar 2025 14:05:37 -0400 (EDT) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id BAEA91C7CCA for ; Thu, 20 Mar 2025 18:05:38 +0000 (UTC) X-FDA: 83242707156.08.7FDFFCA Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by imf25.hostedemail.com (Postfix) with ESMTP id B45EAA0017 for ; Thu, 20 Mar 2025 18:05:36 +0000 (UTC) Authentication-Results: imf25.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf25.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=1742493937; a=rsa-sha256; cv=none; b=cQFSqtgVIDTSx9ilJ7j1t+lBhTebyXvrHNfd0fQOswKOFY2YCQSLEXyf/FUZPT8j1Q1va1 f+fW9/WADGm6r7DtOXwvL7z9qRLhk+hxFVQTpSfHb771GBBRRpuMOE2mgx4+6FxySgo2o3 Bvg8HPkamIVERvN2yzxNGL0bCnRBteY= ARC-Authentication-Results: i=1; imf25.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf25.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=1742493937; 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=xf4GWGi9vbUQYnaup1WtTfIck5lpvUTlCsoMqVH1rag=; b=zpU2v80HVM0X/sQgS+9VPojWeXtYmBqHbSPy/XRr8qoEIB8+cDL3z+sXTO3ybrllDE+k1x jB3smXR2nJXSoUpZcOdClFi+ksP5VJq/5SpYvrfEhNDDW9E80qEOlWn1N8Ixsm1SUX2rbd 94IyCzQmBqpPqLqD1+jCmmA9SPk02OI= Received: from mail.maildlp.com (unknown [172.18.186.231]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4ZJYK32CMbz6L58c; Fri, 21 Mar 2025 02:00:39 +0800 (CST) Received: from frapeml500007.china.huawei.com (unknown [7.182.85.172]) by mail.maildlp.com (Postfix) with ESMTPS id CBD7314050D; Fri, 21 Mar 2025 02:05:33 +0800 (CST) Received: from P_UKIT01-A7bmah.china.huawei.com (10.48.156.145) by frapeml500007.china.huawei.com (7.182.85.172) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Thu, 20 Mar 2025 19:05:31 +0100 From: To: , , , , , , , , , CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: [PATCH v2 2/8] EDAC: Update documentation for the CXL memory patrol scrub control feature Date: Thu, 20 Mar 2025 18:04:39 +0000 Message-ID: <20250320180450.539-3-shiju.jose@huawei.com> X-Mailer: git-send-email 2.43.0.windows.1 In-Reply-To: <20250320180450.539-1-shiju.jose@huawei.com> References: <20250320180450.539-1-shiju.jose@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.48.156.145] X-ClientProxiedBy: lhrpeml100003.china.huawei.com (7.191.160.210) To frapeml500007.china.huawei.com (7.182.85.172) X-Rspam-User: X-Rspamd-Queue-Id: B45EAA0017 X-Rspamd-Server: rspam05 X-Stat-Signature: zwr6w5bpsezme1ni37bod4sk614jzamt X-HE-Tag: 1742493936-473969 X-HE-Meta: U2FsdGVkX1+NkH1y9SUuQU+HAJYMWBb5gtPb8VH2o2TXN96zDWa0dPViLTxuAaJyMyGZicg+aN3eDugxAncevcJ3lHJtvGeujD8AZJeHtG2oEl1Pf0QJ5sMZe7S0zxRmv+FByc+q9N9BZP5nhUI5GcxLdyMPsxdlHQE3kQZOTHklal9sEu9HYajyFYAzFSI+bm8s0MoLwUWyDescCcyVC5cOM34409KPsMGfSuP1BXcj1IzG0fHggEkxtRRFwmy0qg5raggtA/I6l3Cdo5lr8u3RRL1DMshs2xixA9lZ+xXMqWNn2aIP8ssmpaofZDnDZX8UPwUtnb2F5yf4n8iGeMKBFDPtrmqu9v6Avio9c56lrO/M9nq/atH9VIMfLBR5nH5rt45LIeKokYRmwRjh8EM+G8XB8OoQFewn8J6mGV9ioeww2K34vqj86uNaWmfy5zqjcrwRkzF5wDfBOhAf3cHjOZwtIJKyRiNUtjG0mExHPKF+U6I0La7BXT+zJPBFQ2/PtvaKPOGa18fk/YkjV33SAeXXdS4KR8cWv2gbHWEcuQTZ7WOhPND+Ts6gKwUFUDfJxeZnExHRG9vek28V54GY4Dz9sR3SKd+tuDXhPlYtwYdMKe5LY/hr6AzugQsj9ifiEUUzd1tjyaZneqlnft2WTIEh1Wd44x9Yi/KwHOXm62XglvH9FteNqikJ+10wk+tMy9wYLcly4R591vSAavFUoSxXiaPfGY/+3mwrQgu/3x9kquLWg8SN6o5vau2V5VWjE4sH7miXEAW2wY+/p/ki2L40KGKC/wLqmoFI7fJk6axTgINHuLqRmbF57ddImf1SljEtPdGmTR0VgcFG6roOCGnz0wBpAYGWcFpn+ZOLwMzWXE/x/A== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000003, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: From: Shiju Jose Update the Documentation/edac/scrub.rst to include descriptions and policies for CXL memory device-based and CXL region-based patrol scrub control. Note: This may require inputs from CXL memory experts regarding region-based scrubbing policies. Signed-off-by: Shiju Jose --- Documentation/edac/scrub.rst | 47 ++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/Documentation/edac/scrub.rst b/Documentation/edac/scrub.rst index daab929cdba1..d1c02bd90090 100644 --- a/Documentation/edac/scrub.rst +++ b/Documentation/edac/scrub.rst @@ -264,3 +264,51 @@ Sysfs files are documented in `Documentation/ABI/testing/sysfs-edac-scrub` `Documentation/ABI/testing/sysfs-edac-ecs` + +Examples +-------- + +The usage takes the form shown in these examples: + +1. CXL memory device patrol scrubber + +1.1 Device based scrubbing + +CXL memory is exposed to memory management subsystem and ultimately userspace +via CXL devices. + +For cases where hardware interleave controls do not directly map to regions of +Physical Address space, perhaps due to interleave the approach described inĀ  +1.2 Region based scrubbing section, which is specific to CXL regions should be +followed. In those cases settings on the presented interface may interact with +direct control via a device instance specific interface and care must be taken. + +Sysfs files for scrubbing are documented in +`Documentation/ABI/testing/sysfs-edac-scrub` + +1.2. Region based scrubbing + +CXL memory is exposed to memory management subsystem and ultimately userspace +via CXL regions. CXL Regions represent mapped memory capacity in system +physical address space. These can incorporate one or more parts of multiple CXL +memory devices with traffic interleaved across them. The user may want to control +the scrub rate via this more abstract region instead of having to figure out the +constituent devices and program them separately. The scrub rate for each device +covers the whole device. Thus if multiple regions use parts of that device then +requests for scrubbing of other regions may result in a higher scrub rate than +requested for this specific region. + +1. When user sets scrub rate for a memory region, the scrub rate for all the CXL + memory devices interleaved under that region is updated with the same scrub + rate. + +2. When user sets scrub rate for a memory device, only the scrub rate for that + memory devices is updated though device may be part of a memory region and + does not change scrub rate of other memory devices of that memory region. + +3. Scrub rate of a CXL memory device may be set via EDAC device or region scrub + interface simultaneously. Care must be taken to prevent a race condition, or + only region-based setting may be allowed. + +Sysfs files for scrubbing are documented in +`Documentation/ABI/testing/sysfs-edac-scrub`