mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Miaohe Lin <linmiaohe@huawei.com>
To: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Cc: Mauro Carvalho Chehab <m.chehab@huawei.com>,
	<linux-kernel@vger.kernel.org>, <linux-mm@kvack.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Naoya Horiguchi <nao.horiguchi@gmail.com>,
	zhenwei pi <pizhenwei@bytedance.com>
Subject: Re: [PATCH] mm: memory-failure: update statistics before emitting the trace event
Date: Mon, 2 Nov 2026 11:40:57 +0800	[thread overview]
Message-ID: <85af4757-745f-08d4-b896-d38f9fad632c@huawei.com> (raw)
In-Reply-To: <d472a9a3ccfa8c0359d7d7acabed92c8927d8e47.1793174996.git.mchehab+huawei@kernel.org>

On 2026/10/28 16:09, Mauro Carvalho Chehab wrote:
> From: Mauro Carvalho Chehab <m.chehab@huawei.com>
> 
> 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.
> 
> Fixes: e240ac52f7da ("mm/memory-failure.c: simplify num_poisoned_pages_inc/dec")
> Closes: https://github.com/mchehab/rasdaemon-ci/actions/runs/40629018388
> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

Acked-by: Miaohe Lin <linmiaohe@huawei.com>

Thanks.
.

      reply	other threads:[~2026-11-02  3:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-28  8:09 Mauro Carvalho Chehab
2026-11-02  3:40 ` Miaohe Lin [this message]

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=85af4757-745f-08d4-b896-d38f9fad632c@huawei.com \
    --to=linmiaohe@huawei.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=m.chehab@huawei.com \
    --cc=mchehab+huawei@kernel.org \
    --cc=nao.horiguchi@gmail.com \
    --cc=pizhenwei@bytedance.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

all inboxes | Powered by JetHome®