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 AD3B0C27C79 for ; Thu, 20 Jun 2024 17:26:04 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D865D8D00C4; Thu, 20 Jun 2024 13:26:03 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D36208D00AF; Thu, 20 Jun 2024 13:26:03 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BFE008D00C4; Thu, 20 Jun 2024 13:26:03 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id A417F8D00AF for ; Thu, 20 Jun 2024 13:26:03 -0400 (EDT) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 0E75914041E for ; Thu, 20 Jun 2024 17:26:03 +0000 (UTC) X-FDA: 82251945006.11.6B6C249 Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) by imf04.hostedemail.com (Postfix) with ESMTP id 28F9440016 for ; Thu, 20 Jun 2024 17:26:00 +0000 (UTC) Authentication-Results: imf04.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=Tpx77zxZ; spf=pass (imf04.hostedemail.com: domain of jiaqiyan@google.com designates 209.85.221.50 as permitted sender) smtp.mailfrom=jiaqiyan@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=1718904351; 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=yiRdU3CBR8zGYesiy4ojjtoIZbVxcxArnAv9h/zGc/U=; b=VJSKHG0462xrfg+MvjXlqYoY3K20vOZECciFBQmrXUy6cApqERqHmGGPffsmU9GxaH5bD4 xK4VCNtAyETXwfheAaeOlFKIQ7jndyRep+0bt9ed+cEJ88t4j9vywCtm99AGrDppVmPOKN GJm4/uVKvH9SKR0/MxboG1CaiRI7Xjc= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1718904351; a=rsa-sha256; cv=none; b=p2hXW+QoMuYC5LlRuqs1x2FqBL6sL7VLSiBwhGgIIS/gF1LCoFII0WexUo6z0ZkRBwjI5u LjfZSP1thFzA3F4lzQ2dJoLd3NcAF2UcmFMNfEPYFQBMm8j95DLnFat9MUm0MGVJnQLHFS XAIlBZrAxmtFEXi0HbBNw+a+6GUtP9c= ARC-Authentication-Results: i=1; imf04.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=Tpx77zxZ; spf=pass (imf04.hostedemail.com: domain of jiaqiyan@google.com designates 209.85.221.50 as permitted sender) smtp.mailfrom=jiaqiyan@google.com; dmarc=pass (policy=reject) header.from=google.com Received: by mail-wr1-f50.google.com with SMTP id ffacd0b85a97d-35f2d723ef0so906689f8f.1 for ; Thu, 20 Jun 2024 10:26:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1718904359; x=1719509159; darn=kvack.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=yiRdU3CBR8zGYesiy4ojjtoIZbVxcxArnAv9h/zGc/U=; b=Tpx77zxZYEdul9Dm+WoNfVhgs4t/1xNDDnXxFkJsFPNuwD/eVhwiT88deRm5e0dAPw r40gj0UNIThw3FNxr07KtQyKhCjqSJ/IeEjrUxZ6OMV6arDfKRMPNBhJBcs3jupYoJhR lwNxE5TpMC97kWR+wIdPvs3WdLwLyV8d6tttIGQjWzirqrUdGuUNhgWxzKy3F+WeS1vo GME+W/uSQ4uZiAPAZC7dltJ9LZB9pyNSeaesn8JSRzKovg4fotVHgX40YSXlh39U1CfR ZBKFzRDUVhDsN0NyFgBl00GUyZE9v1NoLwGeRrioDn0duvkExwl4T1Zid6KhTBTmYVED cLCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718904359; x=1719509159; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yiRdU3CBR8zGYesiy4ojjtoIZbVxcxArnAv9h/zGc/U=; b=rug6G3Yrllm8a+csq31EZzdhu5u9+JiX3GvftdCg5J664Oh+DZYbqZRGS5yWxeZJls /Y32k1IeQS442cCgsnI0F2AqPpwrN2epsYeRSs5T9cwjP8iYwHsxCBycWM2HXrPj31X5 bws2JmLnwng0SAfBN0XPV9QpJ8BdA/2OhqQy5chaPDzX2XrNldFoFbMd/hHFmA6oEbKC vFyHUykyE1WyaZ5TO8UWtb6TwX1NsnJ0f+n88PTbYaHJGlzS0IJmV9PZ8m2BJ/nttcZr /8LPvtICkRM2FOZuyP7NhHGaJZ7FMmrwMVsKKwX9Z6VW6IMmfVY0Wxg7u+ibvpA6ROdp 2kQA== X-Forwarded-Encrypted: i=1; AJvYcCVaJz4U/83fbc4X+cp6Dp0yxFhqvhKHoJ6tvT0oyqEMvhjxlREb7NbYKKdG5N6WhKxY6ia83LRWb7BbBKQhaZ1d0Wc= X-Gm-Message-State: AOJu0YylDNp7Jd/F6+MjhQqFIt9srl6kKYfioqLl3YK3Ull55cBiZaCX dDKh5D5EzP/Jng8YUd+6i9lvCTB7ucJfKelVqxUGRurOMdMSS9V6k6oHQ+3BrDTdBsI3Z43FbTn AFQBYI3YUTWXiN/32r71EL53k8TpawwlwteXK X-Google-Smtp-Source: AGHT+IFS97xWUk+8EsMmc1uhOxElvJVojbiwIIcSg3aELt83j6gfs+TQ+RXLkp4YqGbsB9Fb8XO3HZt270xtdpu2z6s= X-Received: by 2002:a05:6000:e8d:b0:35f:2cd1:a394 with SMTP id ffacd0b85a97d-363175b849amr4395583f8f.22.1718904359131; Thu, 20 Jun 2024 10:25:59 -0700 (PDT) MIME-Version: 1.0 References: <20240617170545.3820912-1-jiaqiyan@google.com> <20240617170545.3820912-4-jiaqiyan@google.com> In-Reply-To: From: Jiaqi Yan Date: Thu, 20 Jun 2024 10:25:43 -0700 Message-ID: Subject: Re: [PATCH v3 3/3] docs: mm: add enable_soft_offline sysctl To: Oscar Salvador 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Stat-Signature: w7f3wmy3ineneqof7mws63he3tfgdpk3 X-Rspamd-Queue-Id: 28F9440016 X-Rspam-User: X-Rspamd-Server: rspam08 X-HE-Tag: 1718904360-427983 X-HE-Meta: U2FsdGVkX19HqVALVXVehCC88zGOVGVmZisgNlr7gcqN4PMsiSXRpwRxAdcwE+0Hex7UiN0JNr2SPDekuvmGvM4RqF8ppNNTvttNZZQWamTeQFqmencdpWKpS0TITSXoRo8P4h9RwL1sd7lfAQ84+4fAaIRN6/cUswrT359QbYtmFuKqTh4/i34jllCb27TqfKr3Vk814po9Dz4zwekfZ41Vnr4TAnAuqdoMeJZJ/IhMsxz+ByeG26pPdsPvsWOUDnreMXk0cqetoHBw6kjyxDmgNB8hL5XVuRXxxtjbjdYEE2SbTfk5sRkph+x7cyE47s+WcJD1ZVzrnZCBKgFaET7ms7EWBVT27o/TiyW9kolR/uq92cqbq6K8/Zi1LRMDPeHGdAwa1Z75NfJ3xBJGsDRJNceQjqBWV4UaQJepw+JqTzdUEkcPoKDgtZXmI119vMFdKgKV4F6+2B36uSyLyF5cKlRuNiiNOl5h+1RV1oEoZrDjrG0sANFooq3uGifHJxIcE4Zb7ngqQEh/iZmPtxJmSD4WN+Dk267ceRtCSH9YO3P8ZwA71kkMisOcDYTyYTDA6EaeqfeR9dNfAniOmXl2TRbZL4buToII0yvVijFilA2XGljvIxJm6neAbuJhvvwSQO3Ts/jC+22phcYiIhLvTtSu/ZAqULZ7haP6K56j1AkQNf9bpoSSdZXMDrT6A4JHGuP79c3WHBuro0tzuU5NcMhuFBXWIjKZsXqnVCWqRYaVFhk/ERO7DTorJqN+Lb8onw5kxokJie+ohDBR/5V7yH/4OhTjyfvM7ytADFXfem7fTKCYgUvXLYJVaFB4QANyO4QMWYhxbC8mv8VRLRba9Dfw6arBrKX4LWTCRB9roFR0wSRwNwFE8Fc25IN07sWttzcV4gYHXleD4q810wvh88uOf4//WwlQ93TyczUOLx2xELe3ZwIJzc8gi7c9M3LJft+8UL7XV356LZ/ VxhlEgIE ZaDxdoK0EznuZNfj3hRrHv0g2jvQ1EkPtBGwKyqkAnc/2yPc8GlBBvg7ErapHBSd/MX6M3LwAWGBfFAgtGc4HvP+W+oDfh2a5z8PhiYDLzT5a3YLhBEbJgh5UEk5SppNTWGJhkODGwt5FwctpsgR1+LuXRh2E/8vP7g55LbejnlC8EYSfyYdLKukwUoz2ZQOT03EZ+fwnLITyu353Rzr0egi8NqIMc93PigIkhfUaBZ6WZxrQSA2pC2rIi6V1Y+6Mq2xTKquG59D+a6qrShzFiexJCcu6bpbWrWDRCv7oqkJ1bDhn5NEF0v3ONpRzHi2NXFNcxj6KA7vPeK85MqyzcwsB/V91aF7LAM/s 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 Tue, Jun 18, 2024 at 10:20=E2=80=AFPM Oscar Salvador = wrote: > > 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/ad= min-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 > > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > +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 / co= sts. > > +- For a raw error page, soft-offline migrates the in-use page's conten= t to > > + a new raw page. > > +- For a page that is part of a transparent hugepage, soft-offline spl= its the > > + transparent hugepage into raw pages, then migrates only the raw erro= r page. > > + As a result, user is transparently backed by 1 less hugepage, impact= ing > > + memory access performance. > > +- For a page that is part of a HugeTLB hugepage, soft-offline first mi= grates > > + the entire HugeTLB hugepage, during which a free hugepage will be co= nsumed > > + as migration target. Then the original hugepage is dissolved into r= aw > > + pages without compensation, reducing the capacity of the HugeTLB poo= l by 1. > > + > > +It is user's call to choose between reliability (staying away from fra= gile > > +physical memory) vs performance / capacity implications in transparent= and > > +HugeTLB cases. > > + > > +For all architectures, enable_soft_offline controls whether to soft of= fline > > +memory pages. When setting to 1, kernel attempts to soft offline the = pages > > +whenever it thinks needed. When setting to 0, kernel returns EOPNOTSU= PP 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". Will reword in v4. > > > Other than that: > > Acked-by: Oscar Salvador Thanks Oscar! > > -- > Oscar Salvador > SUSE Labs