The commit 97f0b13452198290799f ("tracing: add trace event for memory-failure") introduces the selection of RAS in memory-failure. This commit is just a tracing feature; in reality, there is no dependency between memory-failure and RAS. RAS increases the size of the bzImage image by 8k, which is very valuable for embedded devices. Signed-off-by: Xie Yuanbin --- mm/Kconfig | 1 - mm/memory-failure.c | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/mm/Kconfig b/mm/Kconfig index a5a90b169435..c3a8e0ba1ac1 100644 --- a/mm/Kconfig +++ b/mm/Kconfig @@ -738,11 +738,10 @@ config ARCH_SUPPORTS_MEMORY_FAILURE config MEMORY_FAILURE depends on MMU depends on ARCH_SUPPORTS_MEMORY_FAILURE bool "Enable recovery from hardware memory errors" - select RAS 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. diff --git a/mm/memory-failure.c b/mm/memory-failure.c index f698df156bf8..baf2bd79b2fb 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c @@ -1276,11 +1276,13 @@ static void update_per_node_mf_stats(unsigned long pfn, * 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); } -- 2.51.0