From: "Luck, Tony" <tony.luck@intel.com>
To: "Liam R. Howlett" <Liam.Howlett@oracle.com>,
"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
<surenb@google.com>, "Anderson, Russ" <russ.anderson@hpe.com>,
<rppt@kernel.org>, <osalvador@suse.de>, <nao.horiguchi@gmail.com>,
<mhocko@suse.com>, <lorenzo.stoakes@oracle.com>,
<linmiaohe@huawei.com>, <jiaqiyan@google.com>,
<jane.chu@oracle.com>, <david@redhat.com>, <bp@alien8.de>,
"Meyer, Kyle" <kyle.meyer@hpe.com>, <akpm@linux-foundation.org>,
<linux-mm@kvack.org>, <vbabka@suse.cz>,
<linux-acpi@vger.kernel.org>, Shawn Fan <shawn.fan@intel.com>
Subject: [PATCH v2] ACPI: APEI: GHES: Don't offline huge pages just because BIOS asked
Date: Fri, 5 Sep 2025 08:53:43 -0700 [thread overview]
Message-ID: <aLsHh70jI6BGHjaN@agluck-desk3> (raw)
In-Reply-To: <brfqzhbipg35twgv22vnnotbv3t3grwh2dxugvtbgqduuhsvst@f7exibz7i7tk>
BIOS can supply a GHES error record that reports that the corrected
error threshold has been exceeded. Linux will attempt to soft offline
the page in response.
But "exceeded threshold" has many interpretations. Some BIOS versions
accumulate error counts per-rank, and then report threshold exceeded
when the number of errors crosses a threshold for the rank. Taking
a page offline in this case is unlikely to solve any problems. But
losing a 4KB page will have little impact on the overall system.
On the other hand, taking a huge page offline will have significant
impact (and still not solve any problems).
Check if the GHES record refers to a huge page. Skip the offline
process if the page is huge.
Reported-by: Shawn Fan <shawn.fan@intel.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
---
Changes since v1:
* Mike Rapoport: Save a line by using pfn_folio()
* Liam R. Howlett: Don't return false. Continue to rest of function.
[Yes, code could use "else if" since "sec_sev" can't be both GHES_SEV_CORRECTED
and GHES_SEV_RECOVERABLE. But I left that alone for now as unrelated to
this change]
drivers/acpi/apei/ghes.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c
index a0d54993edb3..92a767fa7ca4 100644
--- a/drivers/acpi/apei/ghes.c
+++ b/drivers/acpi/apei/ghes.c
@@ -540,8 +540,14 @@ static bool ghes_handle_memory_failure(struct acpi_hest_generic_data *gdata,
/* iff following two events can be handled properly by now */
if (sec_sev == GHES_SEV_CORRECTED &&
- (gdata->flags & CPER_SEC_ERROR_THRESHOLD_EXCEEDED))
- flags = MF_SOFT_OFFLINE;
+ (gdata->flags & CPER_SEC_ERROR_THRESHOLD_EXCEEDED)) {
+ unsigned long pfn = PHYS_PFN(mem_err->physical_addr);
+ struct folio *folio = pfn_folio(pfn);
+
+ /* Only try to offline non-huge pages */
+ if (!folio_test_hugetlb(folio))
+ flags = MF_SOFT_OFFLINE;
+ }
if (sev == GHES_SEV_RECOVERABLE && sec_sev == GHES_SEV_RECOVERABLE)
flags = sync ? MF_ACTION_REQUIRED : 0;
--
2.51.0
next prev parent reply other threads:[~2025-09-05 15:53 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-04 15:57 [PATCH] " Tony Luck
2025-09-04 17:25 ` Mike Rapoport
2025-09-04 18:16 ` Liam R. Howlett
2025-09-05 15:53 ` Luck, Tony [this message]
2025-09-05 16:25 ` [PATCH v2] " Liam R. Howlett
2025-09-05 18:17 ` PATCH v3 " Luck, Tony
2025-09-05 19:39 ` jane.chu
2025-09-05 19:58 ` Luck, Tony
2025-09-05 20:14 ` jane.chu
2025-09-05 20:36 ` Luck, Tony
2025-09-05 19:59 ` Jiaqi Yan
2025-09-08 19:14 ` Kyle Meyer
2025-09-08 20:01 ` Luck, Tony
2025-09-10 12:01 ` Rafael J. Wysocki
2025-09-18 3:39 ` Shuai Xue
2025-09-18 15:43 ` Jiaqi Yan
2025-09-18 18:45 ` Luck, Tony
2025-09-19 1:53 ` Shuai Xue
2025-09-18 19:46 ` Luck, Tony
2025-09-19 1:49 ` Shuai Xue
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=aLsHh70jI6BGHjaN@agluck-desk3 \
--to=tony.luck@intel.com \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=bp@alien8.de \
--cc=david@redhat.com \
--cc=jane.chu@oracle.com \
--cc=jiaqiyan@google.com \
--cc=kyle.meyer@hpe.com \
--cc=linmiaohe@huawei.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lorenzo.stoakes@oracle.com \
--cc=mhocko@suse.com \
--cc=nao.horiguchi@gmail.com \
--cc=osalvador@suse.de \
--cc=rafael.j.wysocki@intel.com \
--cc=rppt@kernel.org \
--cc=russ.anderson@hpe.com \
--cc=shawn.fan@intel.com \
--cc=surenb@google.com \
--cc=vbabka@suse.cz \
/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