linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ACPI: APEI: GHES: Don't offline huge pages just because BIOS asked
@ 2025-09-04 15:57 Tony Luck
  2025-09-04 17:25 ` Mike Rapoport
  2025-09-04 18:16 ` Liam R. Howlett
  0 siblings, 2 replies; 20+ messages in thread
From: Tony Luck @ 2025-09-04 15:57 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: surenb, Anderson, Russ, rppt, osalvador, nao.horiguchi, mhocko,
	lorenzo.stoakes, linmiaohe, liam.howlett, jiaqiyan, jane.chu,
	david, bp, Meyer, Kyle, akpm, linux-mm, vbabka, linux-acpi,
	Tony Luck, Shawn Fan

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>
---
 drivers/acpi/apei/ghes.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c
index a0d54993edb3..bacfebdd4969 100644
--- a/drivers/acpi/apei/ghes.c
+++ b/drivers/acpi/apei/ghes.c
@@ -540,8 +540,16 @@ 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))
+	    (gdata->flags & CPER_SEC_ERROR_THRESHOLD_EXCEEDED)) {
+		unsigned long pfn = PHYS_PFN(mem_err->physical_addr);
+		struct page *page = pfn_to_page(pfn);
+		struct folio *folio = page_folio(page);
+
+		if (folio_test_hugetlb(folio))
+			return false;
+
 		flags = MF_SOFT_OFFLINE;
+	}
 	if (sev == GHES_SEV_RECOVERABLE && sec_sev == GHES_SEV_RECOVERABLE)
 		flags = sync ? MF_ACTION_REQUIRED : 0;
 
-- 
2.51.0



^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2025-09-19  1:53 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-04 15:57 [PATCH] ACPI: APEI: GHES: Don't offline huge pages just because BIOS asked Tony Luck
2025-09-04 17:25 ` Mike Rapoport
2025-09-04 18:16 ` Liam R. Howlett
2025-09-05 15:53   ` [PATCH v2] " Luck, Tony
2025-09-05 16:25     ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox