Re: [PATCH v2] mm/memory_hotplug: don't offline a hwpoisoned page still in the page cache
From: Oscar Salvador (SUSE)
Date: Thu Nov 26 2026 - 04:22:28 EST
On Mon, Nov 23, 2026 at 08:45:37PM +0100, David Hildenbrand (Arm) wrote:
> We'll have to find a way to make that reliable. Everything else is just hacking
> around it.
>
> Why can we block concurrent offlining through get_online_mems/put_online_mems?
> But I hate these functions.
>
> Or alternatively (better?), have a memory notifier that block concurrent
> memory_failure() by grabbing the mf_mutex when MEM_GOING_OFFLINE and releasing
> it when MEM_CANCEL_OFFLINE/MEM_OFFLINE.
I think this is the way to go.
memory-failure is a shaky operation and over the years we have seen how challenging
was to interact with other parts of the kernel without crashing.
IMHO, we can try to be clever and try to workaround those issues
(memhotplug vs memfailure) or just make the two exclusive.
@Miaohe: Thoughts?
--
Oscar Salvador
SUSE Labs