From: Jiaqi Yan <jiaqiyan@google.com>
To: David Rientjes <rientjes@google.com>
Cc: nao.horiguchi@gmail.com, linmiaohe@huawei.com,
jane.chu@oracle.com, muchun.song@linux.dev,
akpm@linux-foundation.org, shuah@kernel.org, corbet@lwn.net,
osalvador@suse.de, duenwen@google.com, fvdl@google.com,
linux-mm@kvack.org, linux-kselftest@vger.kernel.org,
linux-doc@vger.kernel.org, Lance Yang <ioworker0@gmail.com>
Subject: Re: [PATCH v2 3/3] docs: mm: add enable_soft_offline sysctl
Date: Fri, 14 Jun 2024 16:15:56 -0700 [thread overview]
Message-ID: <CACw3F525-4w9N5wSVrbTnSz=g=4SxvXD=dWL9nsf1iQuaYj8OQ@mail.gmail.com> (raw)
In-Reply-To: <9461874d-e2d6-25fc-813c-9c9bb0ad1aec@google.com>
Thanks for your questions, David!
On Tue, Jun 11, 2024 at 5:25 PM David Rientjes <rientjes@google.com> wrote:
>
> On Tue, 11 Jun 2024, Jiaqi Yan wrote:
>
> > @@ -267,6 +268,20 @@ 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
> > +===================
> > +Control whether to soft offline memory pages that have (excessive) correctable
> > +memory errors. It is your call to choose between reliability (stay away from
> > +fragile physical memory) vs performance (brought by HugeTLB or transparent
> > +hugepages).
> > +
>
> Could you expand upon the relevance of HugeTLB or THP in this
> documentation? I understand the need in some cases to soft offline memory
> after a number of correctable memory errors, but it's not clear how the
> performance implications plays into this. The paragraph below goes into a
To be accurate, I should say soft offlining transparent hugepage
impacts performance, and soft offlining hugetlb hugepage impacts
capacity. It may be clearer to first explain soft-offline's behaviors
and implications, so that user knows what is the cost of soft-offline,
then talks about the behavior of enable_soft_offline:
Correctable memory errors are very common on servers. Soft-offline is kernel's
handling 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.
> difference in the splitting behavior, are hugepage users the only ones
> that should be concerned with this?
If the cost of migrating a raw page is negligible, then yes, only
hugepage users should be concerned and think about should they disable
soft offline.
>
> > +When setting to 1, kernel attempts to soft offline the page when it thinks
> > +needed. For in-use page, page content will be migrated to a new page. If
> > +the oringinal hugepage is a HugeTLB hugepage, regardless of in-use or free,
>
> s/oringinal/original/
To fix in v3.
>
> > +it will be dissolved into raw pages, and the capacity of the HugeTLB pool
> > +will reduce by 1. If the original hugepage is a transparent hugepage, it
> > +will be split into raw pages. When setting to 0, kernel won't attempt to
> > +soft offline the page. Its default value is 1.
> >
>
> This behavior is the same for all architectures?
>
Yes, enable_soft_offline has the same behavior for all architectures,
and default=1.
It may be worth mentioning that setting enable_soft_offline to 0 means:
- If RAS Correctable Errors Collector is running, its request to soft
offline pages will be ignored.
- On ARM, the request to soft offline pages from GHES driver will be ignored.
- On PARISC, the request to soft offline pages from Page Deallocation
Table will be ignored.
I can add these clarifications in v3 if they are valuable.
prev parent reply other threads:[~2024-06-14 23:22 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-11 21:55 [PATCH v2 0/3] Userspace controls soft-offline pages Jiaqi Yan
2024-06-11 21:55 ` [PATCH v2 1/3] mm/memory-failure: userspace controls soft-offlining pages Jiaqi Yan
2024-06-14 3:28 ` Miaohe Lin
2024-06-14 16:40 ` Jiaqi Yan
2024-06-14 8:35 ` Lance Yang
2024-06-14 16:30 ` Jiaqi Yan
2024-06-17 7:31 ` Miaohe Lin
2024-06-17 7:51 ` Oscar Salvador
2024-06-17 8:16 ` Miaohe Lin
2024-06-17 10:34 ` Lance Yang
2024-06-17 15:42 ` Jiaqi Yan
2024-06-11 21:55 ` [PATCH v2 2/3] selftest/mm: test enable_soft_offline behaviors Jiaqi Yan
2024-06-14 3:50 ` Miaohe Lin
2024-06-14 19:36 ` Jiaqi Yan
2024-06-11 21:55 ` [PATCH v2 3/3] docs: mm: add enable_soft_offline sysctl Jiaqi Yan
2024-06-12 0:25 ` David Rientjes
2024-06-14 23:15 ` Jiaqi Yan [this message]
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='CACw3F525-4w9N5wSVrbTnSz=g=4SxvXD=dWL9nsf1iQuaYj8OQ@mail.gmail.com' \
--to=jiaqiyan@google.com \
--cc=akpm@linux-foundation.org \
--cc=corbet@lwn.net \
--cc=duenwen@google.com \
--cc=fvdl@google.com \
--cc=ioworker0@gmail.com \
--cc=jane.chu@oracle.com \
--cc=linmiaohe@huawei.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=muchun.song@linux.dev \
--cc=nao.horiguchi@gmail.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