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 A49A5C27C53 for ; Wed, 19 Jun 2024 05:20:09 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id ED1036B0173; Wed, 19 Jun 2024 01:20:08 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E7FE16B0174; Wed, 19 Jun 2024 01:20:08 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D1FE26B0175; Wed, 19 Jun 2024 01:20:08 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id ACA446B0173 for ; Wed, 19 Jun 2024 01:20:08 -0400 (EDT) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 50D80C0D41 for ; Wed, 19 Jun 2024 05:20:08 +0000 (UTC) X-FDA: 82246486896.23.AF22329 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) by imf12.hostedemail.com (Postfix) with ESMTP id 09E3040011 for ; Wed, 19 Jun 2024 05:20:05 +0000 (UTC) Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=BOOXfrTn; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=hTvEkJj6; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=BOOXfrTn; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=hTvEkJj6; spf=pass (imf12.hostedemail.com: domain of osalvador@suse.de designates 195.135.223.131 as permitted sender) smtp.mailfrom=osalvador@suse.de; dmarc=pass (policy=none) header.from=suse.de ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1718774402; 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=1imiKCuO1clBjPc+1z5RNFFpUob2vVaLpGk8atqc+9E=; b=z6eBEwGnfbMh7357ruoIVLuCgjhL5+VyYWs69m0kTPyi7oTA1TEBucAtHCLUvfkX1A9UMx qJkMAKejvE2g1FxLo/LlF7TNdhNj6Ht3ZqLCkbZ2YAW/+GbLx1ejtSKti4VXbXOWY3u/p9 VAfqh2IagryRoImLTv4gzHs6+xfes7c= ARC-Authentication-Results: i=1; imf12.hostedemail.com; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=BOOXfrTn; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=hTvEkJj6; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=BOOXfrTn; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=hTvEkJj6; spf=pass (imf12.hostedemail.com: domain of osalvador@suse.de designates 195.135.223.131 as permitted sender) smtp.mailfrom=osalvador@suse.de; dmarc=pass (policy=none) header.from=suse.de ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1718774402; a=rsa-sha256; cv=none; b=3rWR1Ccbp9SSFOrw/yCNRHqX6Kvi9/RpdcpCUAEiQ8B/d5SNhhsTNKB/SeTeKN/HzVpbnw oIPYfBG8iynTxFEy9h7m8XPGjmWnM1El6DtrygtXmmyK/6CFOper/Vg0JN1kvndtWjnpIT vqjgvY7jQhXxs38yw2lbfVlfwl23iRc= Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 347B21F7D6; Wed, 19 Jun 2024 05:20:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1718774404; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=1imiKCuO1clBjPc+1z5RNFFpUob2vVaLpGk8atqc+9E=; b=BOOXfrTnyBU+rEetZOpOelCZ0l0Bot/3gj58MbOMsJuHzI1jnMI9qEq8RK+64FRgmtdLf9 CmtJt+K+I1dN0+PwF31Xo0kvAaFDePHvGJoxyuwcpXz49Tx52gpenoL6DjZRTJwS5dXG6r 0CxZ9xpRpZcgvFM6CP7xgDEsLV3YMdE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1718774404; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=1imiKCuO1clBjPc+1z5RNFFpUob2vVaLpGk8atqc+9E=; b=hTvEkJj6ENSwAzlvgYdBQtjMR7vfIUkpuBdCZ3M3ZIt6NWD09eXWX10o+o1diRzAfiST+f lafpRbe9xO8pGvBg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1718774404; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=1imiKCuO1clBjPc+1z5RNFFpUob2vVaLpGk8atqc+9E=; b=BOOXfrTnyBU+rEetZOpOelCZ0l0Bot/3gj58MbOMsJuHzI1jnMI9qEq8RK+64FRgmtdLf9 CmtJt+K+I1dN0+PwF31Xo0kvAaFDePHvGJoxyuwcpXz49Tx52gpenoL6DjZRTJwS5dXG6r 0CxZ9xpRpZcgvFM6CP7xgDEsLV3YMdE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1718774404; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=1imiKCuO1clBjPc+1z5RNFFpUob2vVaLpGk8atqc+9E=; b=hTvEkJj6ENSwAzlvgYdBQtjMR7vfIUkpuBdCZ3M3ZIt6NWD09eXWX10o+o1diRzAfiST+f lafpRbe9xO8pGvBg== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 6173413AAF; Wed, 19 Jun 2024 05:20:03 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id 2uCIFINqcmaKZQAAD6G6ig (envelope-from ); Wed, 19 Jun 2024 05:20:03 +0000 Date: Wed, 19 Jun 2024 07:19:53 +0200 From: Oscar Salvador To: Jiaqi Yan Cc: nao.horiguchi@gmail.com, linmiaohe@huawei.com, jane.chu@oracle.com, ioworker0@gmail.com, muchun.song@linux.dev, akpm@linux-foundation.org, shuah@kernel.org, corbet@lwn.net, rientjes@google.com, duenwen@google.com, fvdl@google.com, linux-mm@kvack.org, linux-kselftest@vger.kernel.org, linux-doc@vger.kernel.org Subject: Re: [PATCH v3 3/3] docs: mm: add enable_soft_offline sysctl Message-ID: References: <20240617170545.3820912-1-jiaqiyan@google.com> <20240617170545.3820912-4-jiaqiyan@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240617170545.3820912-4-jiaqiyan@google.com> X-Rspamd-Action: no action X-Rspam-User: X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 09E3040011 X-Stat-Signature: utsp9mxh31tjyz47ew6y6mwwhaj9c9b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xHM5RVTS1DgQJB7eFly+xyCwtixd7CrLULP87JXYfr/cVDe36CLUK1f9G3wgng5r8BnPXD7eUtE+olf2q85/kppO4qwni9xppgO2o/Cfm8b1Rd5AdYf26uiPtEuQeWo1xJ2mSMxufEU/Uk7rugBh+mzQPSD2/ZEuRa921LPEOoBmELFQRYJ1lOZLoUbTacjGwH6XZLxw0kV14UaRVNpfm/ZxqrWYYIB1OGm5GnW15NGIP3W1sBUurnWrAFLdd81fiutZarh7DQG7JVK742xW5vfDvakI8UHEohIWY+TWBTj2mu7RQ2cFMcMGewJIqAZf9+AFPAbad7yZzq 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: On Mon, Jun 17, 2024 at 05:05:45PM +0000, Jiaqi Yan wrote: > Add the documentation for soft offline behaviors / costs, and what > the new enable_soft_offline sysctl is for. > > Signed-off-by: Jiaqi Yan > --- > Documentation/admin-guide/sysctl/vm.rst | 33 +++++++++++++++++++++++++ > 1 file changed, 33 insertions(+) > > diff --git a/Documentation/admin-guide/sysctl/vm.rst b/Documentation/admin-guide/sysctl/vm.rst > index e86c968a7a0e..fc62fc272fc5 100644 > --- a/Documentation/admin-guide/sysctl/vm.rst > +++ b/Documentation/admin-guide/sysctl/vm.rst > @@ -36,6 +36,7 @@ Currently, these files are in /proc/sys/vm: > - dirtytime_expire_seconds > - dirty_writeback_centisecs > - drop_caches > +- enable_soft_offline > - extfrag_threshold > - highmem_is_dirtyable > - hugetlb_shm_group > @@ -267,6 +268,38 @@ 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 > + 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 > +whenever it thinks needed. When setting to 0, kernel returns EOPNOTSUPP to > +the request to soft offline the pages. Its default value is 1. > + > +It is worth mentioning that after setting enable_soft_offline to 0: > +- If RAS Correctable Errors Collector is running, its request to soft offline > + pages will fail. > +- On ARM, the request to soft offline pages from GHES driver will fail. > +- On PARISC, the request to soft offline pages from Page Deallocation Table > + will fail. I do not know about others but the 'fail' word feels wrong here. I would reword that as "... the request to soft offline pages from xxxx will not be performed". Other than that: Acked-by: Oscar Salvador -- Oscar Salvador SUSE Labs