diff mbox series

[v5,4/4] docs: mm: add enable_soft_offline sysctl

Message ID 20240624163348.1751454-5-jiaqiyan@google.com (mailing list archive)
State New
Headers show
Series Userspace controls soft-offline pages | expand

Commit Message

Jiaqi Yan June 24, 2024, 4:33 p.m. UTC
Add the documentation for soft offline behaviors / costs, and what
the new enable_soft_offline sysctl is for.

Acked-by: Oscar Salvador <osalvador@suse.de>

Signed-off-by: Jiaqi Yan <jiaqiyan@google.com>
---
 Documentation/admin-guide/sysctl/vm.rst | 32 +++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

Comments

Miaohe Lin June 25, 2024, 7:16 a.m. UTC | #1
On 2024/6/25 0:33, 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 <osalvador@suse.de>
> 
> Signed-off-by: Jiaqi Yan <jiaqiyan@google.com>
> ---
>  Documentation/admin-guide/sysctl/vm.rst | 32 +++++++++++++++++++++++++
>  1 file changed, 32 insertions(+)

LGTM. Thanks.
Acked-by: Miaohe Lin <linmiaohe@huawei.com>
Thanks.
.
Randy Dunlap June 26, 2024, 12:02 a.m. UTC | #2
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 <osalvador@suse.de>
> 
> Signed-off-by: Jiaqi Yan <jiaqiyan@google.com>
> ---
>  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
>  =================
Jiaqi Yan June 26, 2024, 12:18 a.m. UTC | #3
On Tue, Jun 25, 2024 at 5:02 PM Randy Dunlap <rdunlap@infradead.org> wrote:
>
> 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 <osalvador@suse.de>
> >
> > Signed-off-by: Jiaqi Yan <jiaqiyan@google.com>
> > ---
> >  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,

Thanks Randy! I will fix these 3 nits in v6.

>
> > +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
diff mbox series

Patch

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
@@ -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,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
+  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, 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
 =================