On Fri, Apr 12, 2024 at 08:48:11PM +0100, Matthew Wilcox wrote: > Yes, I think you're right. As the MM handling of pages has evolved, > people haven't kept memory-failure uptodate. That's both understandable > and regrettable. We kind of had the same problem with memory-hotplug, but we managed to get it up to date. > I don't have the time to focus on memory-failure myself; I have a couple > of hundred uses of page->mapping to eliminate. And I'd want to get a > lot more serious about testing before starting on that journey. > > I do have ideas for handling hwpoison without splitting a folio. But if you want to recover those pages within a large folio that are unaffected, you will have to split it eventually? And so, if we can make sure that the large folio has been split, and subpage cannot be part of another compound page afterwards, we should be safe? But yes, I can see why. Right now, if we fail to split the folio we do not handle the situation at all, we just mark the head as HWPoisoned which is pretty unfortunate because we just lost the chance to contain the error in the subpage, so we flushed a large folio down the toilet. I would be interested to hear those ideas, as having the chance to handle that would be very beneficial, and more deterministic. Thanks -- Oscar Salvador SUSE Labs