RE: [PATCH v2] mm, hwpoison: Try to recover from copy-on write faults

From: Luck, Tony
Date: Thu Oct 20 2022 - 23:57:51 EST


>> + INIT_WORK(&p->work, do_sched_memory_failure);
>> + p->pfn = pfn;
>> + schedule_work(&p->work);
>
> There is already memory_failure_queue() that can do this. Can we use it directly?

Miaohe Lin,

Yes, can use that. A thousand thanks for pointing it out. I just tried it, and it works
perfectly.

I think I'll need to add an empty stub version for the CONFIG_MEMORY_FAILURE=n
build. But that's trivial.

-Tony