From patchwork Fri May 31 21:34:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiaqi Yan X-Patchwork-Id: 13682201 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 72A36C25B75 for ; Fri, 31 May 2024 21:34:57 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 065B86B00AC; Fri, 31 May 2024 17:34:57 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0144D6B00AD; Fri, 31 May 2024 17:34:56 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DF88A6B00AE; Fri, 31 May 2024 17:34:56 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id B84BC6B00AC for ; Fri, 31 May 2024 17:34:56 -0400 (EDT) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 3CABDA280A for ; Fri, 31 May 2024 21:34:56 +0000 (UTC) X-FDA: 82179996192.12.66698A7 Received: from mail-pg1-f201.google.com (mail-pg1-f201.google.com [209.85.215.201]) by imf04.hostedemail.com (Postfix) with ESMTP id 68E9840003 for ; Fri, 31 May 2024 21:34:53 +0000 (UTC) Authentication-Results: imf04.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=RZOyE2aR; spf=pass (imf04.hostedemail.com: domain of 3e0JaZggKCKILKCSKaCPIQQING.EQONKPWZ-OOMXCEM.QTI@flex--jiaqiyan.bounces.google.com designates 209.85.215.201 as permitted sender) smtp.mailfrom=3e0JaZggKCKILKCSKaCPIQQING.EQONKPWZ-OOMXCEM.QTI@flex--jiaqiyan.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1717191293; 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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=P2AZ5BMz5S/rOvkA9+gnvnvJlkq2fc4Ze4ycghZveII=; b=XxJ28fekUZE69AxjYAQ9K6HsN56f3CfmVusOD+B1OGbbbv+VSxcFYty5rrHirbA8zfprs0 Lz+bvrPuwmjmO0sp0YJDl7ojJBkwD1bvY3zF9/Tvgdywe5YdNEYh3sA7/e1lncE5e+ZRuc rVNGwCNqCpo9RBmacolHltrY6jFMExU= ARC-Authentication-Results: i=1; imf04.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=RZOyE2aR; spf=pass (imf04.hostedemail.com: domain of 3e0JaZggKCKILKCSKaCPIQQING.EQONKPWZ-OOMXCEM.QTI@flex--jiaqiyan.bounces.google.com designates 209.85.215.201 as permitted sender) smtp.mailfrom=3e0JaZggKCKILKCSKaCPIQQING.EQONKPWZ-OOMXCEM.QTI@flex--jiaqiyan.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1717191293; a=rsa-sha256; cv=none; b=isJrsxJF/O9s9QuqShzyO/+gpFUfA+Sc/SgfGlIWyqtwx6lEHDn8lElnsW6STxqg2vLTCD QCXxhaAxkm4Dra51p2ovA2GlmbRpjJkBYGbdnJrU6Fmd7qAkmAflVqNChq9cZmZJxy8Q7a vlqew44AbO8/QcqiNJyuYp9bUZIfcT0= Received: by mail-pg1-f201.google.com with SMTP id 41be03b00d2f7-5e4df21f22dso2068363a12.0 for ; Fri, 31 May 2024 14:34:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1717191292; x=1717796092; darn=kvack.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=P2AZ5BMz5S/rOvkA9+gnvnvJlkq2fc4Ze4ycghZveII=; b=RZOyE2aRL/Nc+Z/QJz6WtP1BdoxjSbg3XP6LpetSEg+8+RsW7ijq76MPQ3MT3ARl+w CLwoYm3lgXIyDU3GCbBlVye90PAJtzeGH1L1E1KYlo8DVjf/JQ2svcvwJU4+YQ2BKLNx M2id6CELi700W8a9OVC6L/9to0H5CMmEj+wCNpMbNT68CgvnSm4OB6jOjwxNpfHzH1bl jvPfonF81YP3lOZT5Je9PHmGG3XseBpoAryQBIoaaYSr1/rgO48WlfwYXn4QE0x3OC9d 3LY0kULFM2hi2nEExLjCPi/HkHPWyaPhtBZMkFPZbgXbEQUny7yqMxvo0xmdPUwUVLtz sqog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717191292; x=1717796092; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=P2AZ5BMz5S/rOvkA9+gnvnvJlkq2fc4Ze4ycghZveII=; b=bB/ZQ6Hh9uZYErgSj0N62bBZHroXRvrqtQaDhFsNjFH1qK2+05y58SNXl6i+vqFH9t yhjwa+HgWSDr+IobGGQV6ukF65XfJdUOLClIIUG2FilRUxWoBC71Gal04wlCYUu8u6DQ 1Iz51w2sciVQt05x5LLbjF2Clc5DJKHPYMvniI4icK5cohFYbdp83vGUTOs3s5gdNNAB r69rp4OkBMzIKdTzw1wp0xur8n2OTIJU4hQS0E8XNcBPY+aE1iswdvI+ai/tVK7G6Onb /3GqoqlnRCr3dg6NdGWmPPPqgPljsNRam2Zm0qGXgPBsQTe6cqwCXOC8Mrt5I+g4e54X jvhQ== X-Forwarded-Encrypted: i=1; AJvYcCVzSgKDxlYw976jkMuNMC8+E44wzjdrMYqdFHQms2pDXZZhStWUNPCq327c5f6LWW/NQN7B72wCe6AZKgZLxV9oNAw= X-Gm-Message-State: AOJu0Yw7DPNo3UdIuuYd7KT6aF71VuuccyWlZy2uVmo+aYCl4Db9BhfK u94nmfdku0eq01TlPBamKrYRUtKHLW8ojLPjQIaRaXN1x67tPLrOazPqkyQ7QeRMMNypS2vCVnl lWS14hOiAnA== X-Google-Smtp-Source: AGHT+IHSsGGAcQ6aUIuC8o2985ElkNa7qtVF2VAo7I83ZQQo63eVcbrD7ODzDOPp0guzHEL0/6bg5jblNOTUpg== X-Received: from yjq3.c.googlers.com ([fda3:e722:ac3:cc00:24:72f4:c0a8:272f]) (user=jiaqiyan job=sendgmr) by 2002:a63:951a:0:b0:658:7c4c:25b with SMTP id 41be03b00d2f7-6c3e253c0c9mr14785a12.4.1717191291924; Fri, 31 May 2024 14:34:51 -0700 (PDT) Date: Fri, 31 May 2024 21:34:39 +0000 In-Reply-To: <20240531213439.2958891-1-jiaqiyan@google.com> Mime-Version: 1.0 References: <20240531213439.2958891-1-jiaqiyan@google.com> X-Mailer: git-send-email 2.45.1.288.g0e0cd299f1-goog Message-ID: <20240531213439.2958891-4-jiaqiyan@google.com> Subject: [PATCH v1 3/3] docs: hugetlbpage.rst: add softoffline_corrected_errors From: Jiaqi Yan To: naoya.horiguchi@nec.com, muchun.song@linux.dev, linmiaohe@huawei.com Cc: akpm@linux-foundation.org, mike.kravetz@oracle.com, shuah@kernel.org, corbet@lwn.net, osalvador@suse.de, rientjes@google.com, duenwen@google.com, fvdl@google.com, linux-mm@kvack.org, linux-kselftest@vger.kernel.org, linux-doc@vger.kernel.org, Jiaqi Yan X-Rspam-User: X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 68E9840003 X-Stat-Signature: gxhqq7fabj1ocj6dueupzedf9uztzb1x X-HE-Tag: 1717191293-893770 X-HE-Meta: U2FsdGVkX1/WusVYjhi/8QhuMlmzUFicwa//mmWLrZSdNvhREMQHoGM8zzZryZo4vEmnx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4nedmIHiHRd1uohKzhWvInOiCLlfhfKFNKH8sLjhZL1F77+X3vnnJKOKBojgnhuVQq3lxUnAEgdBFx3YSLVc9oNbsyxJw8tE/E9FP5y2OkluUddp6XMY7niSpeN/mWECjM/7aEpeGbRTRghiQqpfqbaGutiKiltsvJZllxnFqXuAghcns3lVys5ossCOPubl50FmbcC9UK3MuB5bzia/ig5/7r1C/upBw4RsvHi9y4kaoaxHpq5+HkJWhM61ovmxGm7CCxy0leSm5G9TQjmmfQVUtWjM9WqKPpxcfVccuy5gIsDM6Nvdkhm6/eCOzXVeZ/lkEEer1nvOoMxrQOaCfKyeNIe0Zj7cSodWkGVHDj08GfuPn8i1t3K9a4UB/r5HpHcGW/gTp0gkFUwt7JLlBI1TBfv6FKErjUWwdQ/Jdq/y2pRK4FhDdMlQIMyJA/IpEMSCOHZZNk5IKkR5tVMC9kRYlClm4laC/JJtBwREwDkpoESa2twJ1pl0Z0DV6r39Ur9Up5s= 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: Add the documentation for what softoffline_corrected_errors sysfs interface is for. Signed-off-by: Jiaqi Yan --- Documentation/admin-guide/mm/hugetlbpage.rst | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/Documentation/admin-guide/mm/hugetlbpage.rst b/Documentation/admin-guide/mm/hugetlbpage.rst index f34a0d798d5b..7969ae47f5f1 100644 --- a/Documentation/admin-guide/mm/hugetlbpage.rst +++ b/Documentation/admin-guide/mm/hugetlbpage.rst @@ -244,7 +244,8 @@ will exist, of the form:: Inside each of these directories, the set of files contained in ``/proc`` will exist. In addition, two additional interfaces for demoting huge -pages may exist:: +pages, and one additional interface for handling corrected memory errors, +may exist:: demote demote_size @@ -254,6 +255,7 @@ pages may exist:: free_hugepages resv_hugepages surplus_hugepages + softoffline_corrected_errors The demote interfaces provide the ability to split a huge page into smaller huge pages. For example, the x86 architecture supports both @@ -276,6 +278,17 @@ demote actually demoted, compare the value of nr_hugepages before and after writing to the demote interface. demote is a write only interface. +The interface for handling corrected memory errors is + +softoffline_corrected_errors + allow userspace to control how to deal with hugepages that have + corrected memory errors. When setting to 1, kernel attempts to soft + offline the hugepage whenever it thinks needed. If soft offlinging a + huge page succeeds, for in-use hugepage, page content is migrated to a + new hugepage; however, regardless of in-use or free, capacity of the + hugepages will reduce by 1. When setting to 0, kernel won't attempt to + soft offline the hugepage of the specific size. Its default value is 1. + The interfaces which are the same as in ``/proc`` (all except demote and demote_size) function as described above for the default huge page-sized case.