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 6D4A0C2BBCA for ; Wed, 26 Jun 2024 00:02:30 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 914D56B007B; Tue, 25 Jun 2024 20:02:29 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8C44E6B0085; Tue, 25 Jun 2024 20:02:29 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 78BE06B0088; Tue, 25 Jun 2024 20:02:29 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 5B07F6B007B for ; Tue, 25 Jun 2024 20:02:29 -0400 (EDT) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id BDD5C1204F8 for ; Wed, 26 Jun 2024 00:02:28 +0000 (UTC) X-FDA: 82271087976.14.90A8CC1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf26.hostedemail.com (Postfix) with ESMTP id 7CBA214000D for ; Wed, 26 Jun 2024 00:02:25 +0000 (UTC) Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=TqeUx0T1; dmarc=none; spf=none (imf26.hostedemail.com: domain of rdunlap@infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=rdunlap@infradead.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1719360129; 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:dkim-signature; bh=1mNvHSeA/32WVrnX7X9JQIGgpQLA3aHXM77KwB0Y8R4=; b=ZkPCmFiCcUgI/EqQbn6ovLkd/zAVRr/7ikpSejzi3NfLxv7mJulkCRb7DAn5aEU1/3QlO8 phJ90DLwh8lQ3ueGffmQCfMI9T4Fl2ttNH2P/xmIi1giwdQoJ4KN8jack95xl/8mhWDRCW Poc4WgrOOM0X982C6cJlga9UADl52nw= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1719360129; a=rsa-sha256; cv=none; b=jit7+dwIotBvAchCUqFccQG7tIOlmj0eD53TdrRa4IqjfYWYvX4FQrI6imtLt6tGleF79h 2JMOgNI7nWKYmIKDWzxKFtVmZRINjJZCxBudLOHt9SAdso90g0sloBfQoK3kFX5NTOHF6o 0ISMqAYOp3fK6CMxOoKs/KLStuVRhBs= ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=TqeUx0T1; dmarc=none; spf=none (imf26.hostedemail.com: domain of rdunlap@infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=rdunlap@infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Sender:Reply-To:Content-ID:Content-Description; bh=1mNvHSeA/32WVrnX7X9JQIGgpQLA3aHXM77KwB0Y8R4=; b=TqeUx0T18zMZQyijpiKcmomH21 ZPZiODfZvN5e/bC6hxb6YYkViWcG2b8QnHrjUii8pGy9Z6vJ0zoLE9Ve2kgeF9j8HbpehkxWbZoN9 4VLKWdmevQtus91Jpkk2eO9yzTnOi3PAHV0v849+Z0MJ7A+fFs9kQN9HvkWl2gbPEQHRoq6EmkJCY acj44wePR1KS1XsWcpoTRU8vpTxo9r4iiUEi8cWRV1tslzUpcq2KfAMaHOo89CGqU5LKSBkYNGAT+ MtHsnzVbibbBJIRJA77FJ4W3CtiErb12datXszy8OYw1qqhnnb4u9Tlt9F1metwEUSFqDulNLvPoM /8y9bjsw==; Received: from [50.53.4.147] (helo=[192.168.254.15]) by bombadil.infradead.org with esmtpsa (Exim 4.97.1 #2 (Red Hat Linux)) id 1sMG74-00000004rBo-0bQL; Wed, 26 Jun 2024 00:02:14 +0000 Message-ID: <78857a6a-f9a2-4072-b2d4-82fcfda25d2d@infradead.org> Date: Tue, 25 Jun 2024 17:02:12 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v5 4/4] docs: mm: add enable_soft_offline sysctl To: Jiaqi Yan , nao.horiguchi@gmail.com, linmiaohe@huawei.com, jane.chu@oracle.com, ioworker0@gmail.com Cc: muchun.song@linux.dev, akpm@linux-foundation.org, 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 References: <20240624163348.1751454-1-jiaqiyan@google.com> <20240624163348.1751454-5-jiaqiyan@google.com> Content-Language: en-US From: Randy Dunlap In-Reply-To: <20240624163348.1751454-5-jiaqiyan@google.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 7CBA214000D X-Stat-Signature: 3kah9icqwjdr4mohempwyffgwqmzbonq X-Rspam-User: X-HE-Tag: 1719360145-929257 X-HE-Meta: U2FsdGVkX1/ryd8a0pRtrx001UfWcuIbuV7UweGskR4baouRcIS5H7vE4rl1QNVpLC65H+n6+Znv8BqF5rHYHv6nwtTBp/LafKC4Y/lc7RHulbFLTN7AjHK3kzMo2at/2MJpYnO46MXyxbNfRrc/P42VcHUUNinSpzhj7wsi7j2D1kJ3esfDIKpjqg3SU2N4cLELp7lQ7E982O8yYpWa+ARY1S4Axr5eSFVTULP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GBuOBQim8g8Ds02uB8pAiiDejNNei1tPQ6Es0s0E3a41w8SiI+Igq0LMFln2r4ZHu7zKYsk0jeJggyDBqQo/52dnE= 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: Hi-- On 6/24/24 9:33 AM, Jiaqi Yan wrote: > Add the documentation for soft offline behaviors / costs, and what > the new enable_soft_offline sysctl is for. > > Acked-by: Oscar Salvador > > Signed-off-by: Jiaqi Yan > --- > Documentation/admin-guide/sysctl/vm.rst | 32 +++++++++++++++++++++++++ > 1 file changed, 32 insertions(+) > > diff --git a/Documentation/admin-guide/sysctl/vm.rst b/Documentation/admin-guide/sysctl/vm.rst > index e86c968a7a0e..71463a7b3e2a 100644 > --- a/Documentation/admin-guide/sysctl/vm.rst > +++ b/Documentation/admin-guide/sysctl/vm.rst > @@ -267,6 +268,37 @@ used:: > These are informational only. They do not mean that anything is wrong > with your system. To disable them, echo 4 (bit 2) into drop_caches. > > +enable_soft_offline > +=================== > +Correctable memory errors are very common on servers. Soft-offline is kernel's > +solution for memory pages having (excessive) corrected memory errors. > + > +For different types of page, soft-offline has different behaviors / costs. > +- For a raw error page, soft-offline migrates the in-use page's content to > + a new raw page. > +- For a page that is part of a transparent hugepage, soft-offline splits the Use only one space after the comma ...................^ > + transparent hugepage into raw pages, then migrates only the raw error page. > + As a result, user is transparently backed by 1 less hugepage, impacting > + memory access performance. > +- For a page that is part of a HugeTLB hugepage, soft-offline first migrates > + the entire HugeTLB hugepage, during which a free hugepage will be consumed > + as migration target. Then the original hugepage is dissolved into raw > + pages without compensation, reducing the capacity of the HugeTLB pool by 1. > + > +It is user's call to choose between reliability (staying away from fragile > +physical memory) vs performance / capacity implications in transparent and > +HugeTLB cases. > + > +For all architectures, enable_soft_offline controls whether to soft offline > +memory pages. When setting to 1, kernel attempts to soft offline the pages When set to 1, > +whenever it thinks needed. When setting to 0, kernel returns EOPNOTSUPP to When set to 0, > +the request to soft offline the pages. Its default value is 1. > + > +It is worth mentioning that after setting enable_soft_offline to 0, the > +following requests to soft offline pages will not be performed: > +- Request to soft offline pages from RAS Correctable Errors Collector. > +- On ARM, the request to soft offline pages from GHES driver. > +- On PARISC, the request to soft offline pages from Page Deallocation Table. > > extfrag_threshold > ================= -- ~Randy