[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250922021453.3939-2-xieyuanbin1@huawei.com>
Date: Mon, 22 Sep 2025 10:14:53 +0800
From: Xie Yuanbin <xieyuanbin1@...wei.com>
To: <linux@...linux.org.uk>, <akpm@...ux-foundation.org>, <david@...hat.com>,
<lorenzo.stoakes@...cle.com>, <Liam.Howlett@...cle.com>, <vbabka@...e.cz>,
<rppt@...nel.org>, <surenb@...gle.com>, <mhocko@...e.com>,
<linmiaohe@...wei.com>, <nao.horiguchi@...il.com>,
<rmk+kernel@...linux.org.uk>, <ardb@...nel.org>, <nathan@...nel.org>,
<ebiggers@...nel.org>, <arnd@...db.de>, <rostedt@...dmis.org>,
<kees@...nel.org>, <dave@...ilevsky.ca>, <peterz@...radead.org>
CC: <will@...nel.org>, <linux-arm-kernel@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>, <linux-mm@...ck.org>, <liaohua4@...wei.com>,
<lilinjie8@...wei.com>, <xieyuanbin1@...wei.com>
Subject: [RFC PATCH 2/2] ARM: memory-failure: not select RAS and MEMORY_ISOLATION
For memory-failure on ARM, these features do not seem necessary.
Signed-off-by: Xie Yuanbin <xieyuanbin1@...wei.com>
---
mm/Kconfig | 4 ++--
mm/memory-failure.c | 2 ++
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/mm/Kconfig b/mm/Kconfig
index 034a1662d8c1..22eefc4747d5 100644
--- a/mm/Kconfig
+++ b/mm/Kconfig
@@ -742,22 +742,22 @@ config DEFAULT_MMAP_MIN_ADDR
This value can be changed after boot using the
/proc/sys/vm/mmap_min_addr tunable.
config ARCH_SUPPORTS_MEMORY_FAILURE
bool
config MEMORY_FAILURE
depends on MMU
depends on ARCH_SUPPORTS_MEMORY_FAILURE
bool "Enable recovery from hardware memory errors"
- select MEMORY_ISOLATION
- select RAS
+ select MEMORY_ISOLATION if !ARM
+ select RAS if !ARM
help
Enables code to recover from some memory failures on systems
with MCA recovery. This allows a system to continue running
even when some of its memory has uncorrected errors. This requires
special hardware support and typically ECC memory.
config HWPOISON_INJECT
tristate "HWPoison pages injector"
depends on MEMORY_FAILURE && DEBUG_KERNEL && PROC_FS
select PROC_PAGE_MONITOR
diff --git a/mm/memory-failure.c b/mm/memory-failure.c
index a24806bb8e82..83b77caf41a1 100644
--- a/mm/memory-failure.c
+++ b/mm/memory-failure.c
@@ -1271,21 +1271,23 @@ static void update_per_node_mf_stats(unsigned long pfn,
++mf_stats->total;
}
/*
* "Dirty/Clean" indication is not 100% accurate due to the possibility of
* setting PG_dirty outside page lock. See also comment above set_page_dirty().
*/
static int action_result(unsigned long pfn, enum mf_action_page_type type,
enum mf_result result)
{
+#ifdef CONFIG_RAS
trace_memory_failure_event(pfn, type, result);
+#endif
if (type != MF_MSG_ALREADY_POISONED) {
num_poisoned_pages_inc(pfn);
update_per_node_mf_stats(pfn, result);
}
pr_err("%#lx: recovery action for %s: %s\n",
pfn, action_page_types[type], action_name[result]);
return (result == MF_RECOVERED || result == MF_DELAYED) ? 0 : -EBUSY;
--
2.48.1
Powered by blists - more mailing lists