[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <9c0cd24c-559b-4550-9fc8-5dc4bcc20bf7@app.fastmail.com>
Date: Mon, 22 Sep 2025 14:51:59 +0200
From: "Arnd Bergmann" <arnd@...db.de>
To: "Xie Yuanbin" <xieyuanbin1@...wei.com>
Cc: "Liam R. Howlett" <Liam.Howlett@...cle.com>,
"Andrew Morton" <akpm@...ux-foundation.org>,
"Ard Biesheuvel" <ardb@...nel.org>, "Dave Vasilevsky" <dave@...ilevsky.ca>,
"David Hildenbrand" <david@...hat.com>, "Eric Biggers" <ebiggers@...nel.org>,
"Kees Cook" <kees@...nel.org>, liaohua4@...wei.com, lilinjie8@...wei.com,
linmiaohe@...wei.com, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org, linux-mm@...ck.org,
"Russell King" <linux@...linux.org.uk>,
"Lorenzo Stoakes" <lorenzo.stoakes@...cle.com>,
"Michal Hocko" <mhocko@...e.com>, nao.horiguchi@...il.com,
"Nathan Chancellor" <nathan@...nel.org>,
"Peter Zijlstra" <peterz@...radead.org>,
"Russell King" <rmk+kernel@...linux.org.uk>,
"Steven Rostedt" <rostedt@...dmis.org>, "Mike Rapoport" <rppt@...nel.org>,
"Suren Baghdasaryan" <surenb@...gle.com>, "Vlastimil Babka" <vbabka@...e.cz>,
"Will Deacon" <will@...nel.org>
Subject: Re: [RFC PATCH 1/2] ARM: mm: support memory-failure
On Mon, Sep 22, 2025, at 10:28, Xie Yuanbin wrote:
>> It would be helpful to be more specific about what you
>> want to do with this.
>>
>> Are you working on a driver that would actually make use of
>> the exported interface?
>
> Thanks for your reply.
>
> Yes, In fact, we have developed a hardware component to detect DDR bit
> transitions (software does not sense the detection behavior). Once a bit
> transition is detected, an interrupt is reported to the CPU.
>
> On the software side, we have developed a driver module ko to register
> the interrupt callback to perform soft page offline to the corresponding
> physical pages.
>
> In fact, we will export `soft_offline_page` for ko to use (we can ensure
> that it is not called in the interrupt context), but I have looked at the
> code and found that `memory_failure_queue` and `memory_failure` can also
> be used, which are already exported.
Ok
>> I see only a very small number of
>> drivers that call memory_failure(), and none of them are
>> usable on Arm.
>
> I think that not all drivers are in the open source kernel code.
> As far as I know, there should be similar third-party drivers in other
> architectures that use memory-failure functions, like x86 or arm64.
> I am not a specialist in drivers, so if I have made any mistakes,
> please correct me.
I'm not familiar with the memory-failure support, but this sounds
like something that is usually done with a drivers/edac/ driver.
There are many SoC specific drivers, including for 32-bit Arm
SoCs.
Have you considered adding an EDAC driver first? I don't know
how the other platforms that have EDAC drivers handle failures,
but I would assume that either that subsystem already contains
functionality for taking pages offline, or this is something
that should be done in a way that works for all of them without
requiring an extra driver.
Arnd
Powered by blists - more mailing lists