diff options
| author | Mauro Carvalho Chehab <m.chehab@huawei.com> | 2026-10-28 09:09:57 +0100 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2026-11-09 22:44:28 -0800 |
| commit | 043b024a416073c4e2927e25168ec640a0f30be7 (patch) | |
| tree | 85d4dab10d1e693666a2a89374e8248a99456fc5 /tools/perf/scripts/python/bin/stackcollapse-report | |
| parent | f987d9f38a46216d45326b7a61c619c574b45837 (diff) | |
mm: memory-failure: update statistics before emitting the trace event
Today's rasdaemon-ci run showed a race condition at the page poison logic
affecting userspace (rasdaemon): action_result() emits a
memory_failure_event before incrementing num_poisoned_pages and updating
the per-node memory failure statistics.
That causes userspace to read /proc/meminfo to detect HardwareCorrupted
trace events to warn if the value exceeds POISON_STAT_THRESHOLD. This
works most of the cases, but there is a chance that the value not being
updated in time before libtraceevent notification is handled.
Root cause is commit e240ac52f7da ("mm/memory-failure.c: simplify
num_poisoned_pages_inc/dec") which changed the order of updates.
Rasdaemod-ci run up to Oct 27 worked properly, but on today's run, it
failed to get the HardwareCorrupted data from /proc/meminfo because
it was updated only after trigging the hardware error event:
https://mchehab.github.io/rasdaemon-ci/failures/20261028T035110Z-40629018388/daily/aarch64/consumer-poison-page-stat.html
E.g. it failed to log this:
rasdaemon: Poison page statistics exceeded threshold: 4 kB (threshold: 0 kB)
This is important for rasdaemon, as the consumer's action monitors a
failed threshold before poisoning pages. So, if the counter doesn't
update properly, it will end not poisoning pages at the expected
threshold.
Link: https://lore.kernel.org/d472a9a3ccfa8c0359d7d7acabed92c8927d8e47.1793174996.git.mchehab+huawei@kernel.org
Fixes: e240ac52f7da ("mm/memory-failure.c: simplify num_poisoned_pages_inc/dec")
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Closes: https://github.com/mchehab/rasdaemon-ci/actions/runs/40629018388
Acked-by: Miaohe Lin <linmiaohe@huawei.com>
Cc: Naoya Horiguchi <nao.horiguchi@gmail.com>
Cc: zhenwei pi <pizhenwei@bytedance.com>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-report')
0 files changed, 0 insertions, 0 deletions
