From: Borislav Petkov <bp@alien8.de>
To: Shuai Xue <xueshuai@linux.alibaba.com>
Cc: "Luck, Tony" <tony.luck@intel.com>,
"nao.horiguchi@gmail.com" <nao.horiguchi@gmail.com>,
"tglx@linutronix.de" <tglx@linutronix.de>,
"mingo@redhat.com" <mingo@redhat.com>,
"dave.hansen@linux.intel.com" <dave.hansen@linux.intel.com>,
"x86@kernel.org" <x86@kernel.org>,
"hpa@zytor.com" <hpa@zytor.com>,
"linmiaohe@huawei.com" <linmiaohe@huawei.com>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
"peterz@infradead.org" <peterz@infradead.org>,
"jpoimboe@kernel.org" <jpoimboe@kernel.org>,
"linux-edac@vger.kernel.org" <linux-edac@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
"baolin.wang@linux.alibaba.com" <baolin.wang@linux.alibaba.com>,
"tianruidong@linux.alibaba.com" <tianruidong@linux.alibaba.com>
Subject: Re: [PATCH v2 0/5] mm/hwpoison: Fix regressions in memory failure handling
Date: Mon, 24 Feb 2025 23:01:46 +0100 [thread overview]
Message-ID: <20250224220146.GBZ7zsSnXLftyqWzW_@fat_crate.local> (raw)
In-Reply-To: <4e13bef2-7402-4f75-8f0c-4a3cc210c5a6@linux.alibaba.com>
On Fri, Feb 21, 2025 at 02:05:28PM +0800, Shuai Xue wrote:
> #perf script
> kworker/48:1-mm 25516 [048] 1713.893549: probe:memory_failure: (ffffffffaa622db4)
> ffffffffaa622db5 memory_failure+0x5 ([kernel.kallsyms])
> ffffffffaa25aa93 uc_decode_notifier+0x73 ([kernel.kallsyms])
> ffffffffaa3068bb notifier_call_chain+0x5b ([kernel.kallsyms])
> ffffffffaa306ae1 blocking_notifier_call_chain+0x41 ([kernel.kallsyms])
> ffffffffaa25bbfe mce_gen_pool_process+0x3e ([kernel.kallsyms])
> ffffffffaa2f455f process_one_work+0x19f ([kernel.kallsyms])
> ffffffffaa2f509c worker_thread+0x20c ([kernel.kallsyms])
> ffffffffaa2fec89 kthread+0xd9 ([kernel.kallsyms])
> ffffffffaa245131 ret_from_fork+0x31 ([kernel.kallsyms])
> ffffffffaa2076ca ret_from_fork_asm+0x1a ([kernel.kallsyms])
>
> einj_mem_uc 44530 [184] 1713.908089: probe:memory_failure: (ffffffffaa622db4)
> ffffffffaa622db5 memory_failure+0x5 ([kernel.kallsyms])
> ffffffffaa2594fb kill_me_maybe+0x5b ([kernel.kallsyms])
> ffffffffaa2fac29 task_work_run+0x59 ([kernel.kallsyms])
> ffffffffaaf52347 irqentry_exit_to_user_mode+0x1c7 ([kernel.kallsyms])
> ffffffffaaf50bce noist_exc_machine_check+0x3e ([kernel.kallsyms])
> ffffffffaa001303 asm_exc_machine_check+0x33 ([kernel.kallsyms])
> 405046 thread+0xe (/home/shawn.xs/ras-tools/einj_mem_uc)
>
> einj_mem_uc 44531 [089] 1713.916319: probe:memory_failure: (ffffffffaa622db4)
> ffffffffaa622db5 memory_failure+0x5 ([kernel.kallsyms])
> ffffffffaa2594fb kill_me_maybe+0x5b ([kernel.kallsyms])
> ffffffffaa2fac29 task_work_run+0x59 ([kernel.kallsyms])
> ffffffffaaf52347 irqentry_exit_to_user_mode+0x1c7 ([kernel.kallsyms])
> ffffffffaaf50bce noist_exc_machine_check+0x3e ([kernel.kallsyms])
> ffffffffaa001303 asm_exc_machine_check+0x33 ([kernel.kallsyms])
> 405046 thread+0xe (/home/shawn.xs/ras-tools/einj_mem_uc)
What are those stack traces supposed to say?
Two processes are injecting, cause a #MC and a kworker gets to handle the UC?
All injecting to the same page?
What's the upper limit on CPUs seeing the same hw error and all raising
a CMCI/#MC?
> - kill_accessing_process() is only called when the flags are set to
> MF_ACTION_REQUIRED, which means it is in the MCE path.
> - Whether the page is clean determines the behavior of try_to_unmap. For a
> dirty page, try_to_unmap uses TTU_HWPOISON to unmap the PTE and convert the
> PTE entry to a swap entry. For a clean page, try_to_unmap uses ~TTU_HWPOISON
> and simply unmaps the PTE.
> - When does walk_page_range() with hwpoison_walk_ops return 1?
> 1. If the poison page still exists, we should of course kill the current
> process.
> 2. If the poison page does not exist, but is_hwpoison_entry is true, meaning
> it is a dirty page, we should also kill the current process, too.
> 3. Otherwise, it returns 0, which means the page is clean.
I think you're too deep into detail. What I'd do is step back, think what
would be the *proper* recovery action and then make sure memory_failure does
that. If it doesn't - fix it to do so.
So, what should really happen wrt recovery action if any number of CPUs see
the same memory error?
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
next prev parent reply other threads:[~2025-02-24 22:02 UTC|newest]
Thread overview: 59+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-17 6:33 Shuai Xue
2025-02-17 6:33 ` [PATCH v2 1/5] x86/mce: Collect error message for severities below MCE_PANIC_SEVERITY Shuai Xue
2025-02-18 7:58 ` Borislav Petkov
2025-02-18 9:39 ` Shuai Xue
2025-02-18 9:50 ` Borislav Petkov
2025-02-17 6:33 ` [PATCH v2 2/5] x86/mce: dump error msg from severities Shuai Xue
2025-02-28 12:37 ` Borislav Petkov
2025-03-01 6:16 ` Shuai Xue
2025-03-01 11:10 ` Borislav Petkov
2025-03-01 14:03 ` Shuai Xue
2025-03-01 18:47 ` Borislav Petkov
2025-03-02 7:14 ` Shuai Xue
2025-03-02 7:37 ` Borislav Petkov
2025-03-02 9:13 ` Shuai Xue
2025-03-03 16:49 ` Luck, Tony
2025-03-03 18:08 ` Yazen Ghannam
2025-03-05 1:50 ` Shuai Xue
2025-03-05 16:16 ` Luck, Tony
2025-03-05 22:33 ` Luck, Tony
2025-03-06 15:58 ` Yazen Ghannam
2025-02-17 6:33 ` [PATCH v2 3/5] x86/mce: add EX_TYPE_EFAULT_REG as in-kernel recovery context to fix copy-from-user operations regression Shuai Xue
2025-02-18 12:54 ` Peter Zijlstra
2025-02-18 13:02 ` Peter Zijlstra
2025-02-18 14:03 ` Shuai Xue
2025-02-18 13:28 ` Shuai Xue
2025-02-18 14:15 ` Peter Zijlstra
2025-02-18 16:48 ` Borislav Petkov
2025-02-19 10:40 ` Peter Zijlstra
2025-02-21 6:52 ` Shuai Xue
2025-02-17 6:33 ` [PATCH v2 4/5] mm/hwpoison: Fix incorrect "not recovered" report for recovered clean pages Shuai Xue
2025-02-19 6:34 ` Miaohe Lin
2025-02-19 8:54 ` Shuai Xue
2025-02-19 17:15 ` Luck, Tony
2025-02-20 1:16 ` Miaohe Lin
2025-02-17 6:33 ` [PATCH v2 5/5] mm: memory-failure: move return value documentation to function declaration Shuai Xue
2025-02-19 6:31 ` Miaohe Lin
2025-02-18 3:29 ` [PATCH v2 0/5] mm/hwpoison: Fix regressions in memory failure handling Andrew Morton
2025-02-18 8:03 ` Borislav Petkov
2025-02-18 8:27 ` Borislav Petkov
2025-02-18 11:31 ` Shuai Xue
2025-02-18 12:24 ` Borislav Petkov
2025-02-18 13:08 ` Shuai Xue
2025-02-18 13:17 ` Borislav Petkov
2025-02-18 13:53 ` Shuai Xue
2025-02-18 15:31 ` Borislav Petkov
2025-02-19 7:13 ` Shuai Xue
2025-02-18 17:59 ` Luck, Tony
2025-02-19 6:04 ` Shuai Xue
2025-02-18 17:30 ` Luck, Tony
2025-02-19 8:10 ` Borislav Petkov
2025-02-19 17:11 ` Luck, Tony
2025-02-20 11:19 ` Borislav Petkov
2025-02-20 17:50 ` Luck, Tony
2025-02-21 6:05 ` Shuai Xue
2025-02-24 22:01 ` Borislav Petkov [this message]
2025-02-25 1:51 ` Shuai Xue
2025-02-28 12:35 ` Borislav Petkov
2025-03-01 5:54 ` Shuai Xue
2025-02-24 21:50 ` Borislav Petkov
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=20250224220146.GBZ7zsSnXLftyqWzW_@fat_crate.local \
--to=bp@alien8.de \
--cc=akpm@linux-foundation.org \
--cc=baolin.wang@linux.alibaba.com \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=jpoimboe@kernel.org \
--cc=linmiaohe@huawei.com \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mingo@redhat.com \
--cc=nao.horiguchi@gmail.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=tianruidong@linux.alibaba.com \
--cc=tony.luck@intel.com \
--cc=x86@kernel.org \
--cc=xueshuai@linux.alibaba.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