linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: Xie Yuanbin <xieyuanbin1@huawei.com>,
	tglx@linutronix.de, mingo@redhat.com, bp@alien8.de,
	dave.hansen@linux.intel.com, hpa@zytor.com,
	akpm@linux-foundation.org, lorenzo.stoakes@oracle.com,
	Liam.Howlett@oracle.com, vbabka@suse.cz, rppt@kernel.org,
	surenb@google.com, mhocko@suse.com, linmiaohe@huawei.com,
	nao.horiguchi@gmail.com, luto@kernel.org, peterz@infradead.org,
	tony.luck@intel.com
Cc: x86@kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	linux-edac@vger.kernel.org, will@kernel.org, liaohua4@huawei.com,
	lilinjie8@huawei.com
Subject: Re: [PATCH 2/2] mm/memory-failure: remove the selection of RAS
Date: Mon, 3 Nov 2025 13:15:58 +0100	[thread overview]
Message-ID: <341ff738-255f-41c7-8b23-48aac4cf51e3@redhat.com> (raw)
In-Reply-To: <20251103033536.52234-2-xieyuanbin1@huawei.com>

On 03.11.25 04:35, Xie Yuanbin wrote:
> 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 <xieyuanbin1@huawei.com>
> ---
>   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);
>   	}

I rather wonder whether the memory-tracing code should live in a 
memory-failure.h instead.

-- 
Cheers

David / dhildenb



  reply	other threads:[~2025-11-03 12:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-03  3:35 [PATCH 1/2] x86/mm: support memory-failure on 32-bits with SPARSEMEM Xie Yuanbin
2025-11-03  3:35 ` [PATCH 2/2] mm/memory-failure: remove the selection of RAS Xie Yuanbin
2025-11-03 12:15   ` David Hildenbrand [this message]
2025-11-03 12:39     ` Borislav Petkov
2025-11-04  2:20       ` [PATCH 1/2] x86/mm: support memory-failure on 32-bits with SPARSEMEM Xie Yuanbin
2025-11-03 12:08 ` David Hildenbrand
2025-11-03 13:23   ` Xie Yuanbin
2025-11-03 14:43     ` Dave Hansen

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=341ff738-255f-41c7-8b23-48aac4cf51e3@redhat.com \
    --to=david@redhat.com \
    --cc=Liam.Howlett@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=liaohua4@huawei.com \
    --cc=lilinjie8@huawei.com \
    --cc=linmiaohe@huawei.com \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lorenzo.stoakes@oracle.com \
    --cc=luto@kernel.org \
    --cc=mhocko@suse.com \
    --cc=mingo@redhat.com \
    --cc=nao.horiguchi@gmail.com \
    --cc=peterz@infradead.org \
    --cc=rppt@kernel.org \
    --cc=surenb@google.com \
    --cc=tglx@linutronix.de \
    --cc=tony.luck@intel.com \
    --cc=vbabka@suse.cz \
    --cc=will@kernel.org \
    --cc=x86@kernel.org \
    --cc=xieyuanbin1@huawei.com \
    /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