linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Jiaqi Yan <jiaqiyan@google.com>
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 <jiaqiyan@google.com>
Subject: [PATCH v1 3/3] docs: hugetlbpage.rst: add softoffline_corrected_errors
Date: Fri, 31 May 2024 21:34:39 +0000	[thread overview]
Message-ID: <20240531213439.2958891-4-jiaqiyan@google.com> (raw)
In-Reply-To: <20240531213439.2958891-1-jiaqiyan@google.com>

Add the documentation for what softoffline_corrected_errors
sysfs interface is for.

Signed-off-by: Jiaqi Yan <jiaqiyan@google.com>
---
 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.
 
-- 
2.45.1.288.g0e0cd299f1-goog



  parent reply	other threads:[~2024-05-31 21:34 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-31 21:34 [PATCH v1 0/3] Userspace controls soft-offline HugeTLB pages Jiaqi Yan
2024-05-31 21:34 ` [PATCH v1 1/3] mm/memory-failure: userspace controls soft-offlining hugetlb pages Jiaqi Yan
2024-06-07 22:26   ` Jiaqi Yan
2024-05-31 21:34 ` [PATCH v1 2/3] selftest/mm: test softoffline_corrected_errors behaviors Jiaqi Yan
2024-05-31 21:34 ` Jiaqi Yan [this message]
2024-06-04  7:19 ` [PATCH v1 0/3] Userspace controls soft-offline HugeTLB pages Miaohe Lin
2024-06-07 22:22   ` Jiaqi Yan
2024-06-10 19:41     ` Jane Chu
2024-06-10 22:55       ` Jiaqi Yan
2024-06-11 17:55         ` Jane Chu
2024-06-11 18:12           ` Jiaqi Yan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240531213439.2958891-4-jiaqiyan@google.com \
    --to=jiaqiyan@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=corbet@lwn.net \
    --cc=duenwen@google.com \
    --cc=fvdl@google.com \
    --cc=linmiaohe@huawei.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mike.kravetz@oracle.com \
    --cc=muchun.song@linux.dev \
    --cc=naoya.horiguchi@nec.com \
    --cc=osalvador@suse.de \
    --cc=rientjes@google.com \
    --cc=shuah@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox