Re: [RFC PATCH 3/5] mm/memory-failure: Add a pre-online poison registry

From: David Hildenbrand (Arm)

Date: Thu Nov 12 2026 - 04:21:12 EST


On 10/10/26 18:20, Shaikh Kamaluddin wrote:
> A frame can be known bad before its backing memory is onlined. A CXL
> Type-3 device retains poison as DPA-based Media Error Records and can
> report those records through GET_POISON_LIST after a reboot, kexec, or
> device hotplug.
>
> CXL poison can be retrieved while a region is being prepared, before
> dax/kmem calls add_memory_driver_managed() for the range. At that point
> there is no initialized struct page on which memory_failure() can
> operate. The poison information must therefore be retained until the
> corresponding pages pass through memory initialization.
>
> Add a registry of sorted, nonoverlapping poisoned PFN ranges. Each
> registration represents one owner and its independently managed memory.
> For example, a CXL region registers the poisoned PFN ranges translated
> from its device poison records and receives an opaque handle for that
> range set. A second CXL region receives a separate handle for its own
> ranges.
>
> The owner uses its handle to remove exactly its registration after the
> associated memory can no longer enter the allocator. Removing one CXL
> region's registration does not affect poison ranges registered by
> another region.
>
> Keep each registered range set immutable and protect the registration
> list with RCU. This keeps allocator-side lookups lockless while allowing
> a registration to be removed safely after an RCU grace period. A later
> patch will consult the registry before initialized pages are released
> to the buddy allocator.
>
> Signed-off-by: Shaikh Kamaluddin <shaikhkamal2012@xxxxxxxxx>
> ---

Oh no, another source of poison information. That doesn't sound like a good design.

--
Cheers,

David