>> + 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