On Tue, May 1, 2018 at 8:20 PM, Dan Williams <dan.j.willi...@intel.com> wrote: > On Tue, May 1, 2018 at 8:13 PM, Linus Torvalds > <torva...@linux-foundation.org> wrote: >> On Tue, May 1, 2018 at 8:03 PM Dan Williams <dan.j.willi...@intel.com> >> wrote: >> >>> Because dax. There's no page cache indirection games we can play here >>> to poison a page and map in another page. The mapped page is 1:1 >>> associated with the filesystem block and physical memory address. >> >> I'm not talking page cache indirection. >> >> I'm talking literally mapping a different page into the kernel virtual >> address space that the failing read was done for. >> >> But you seem to be right that we don't actually support that. I'm guessing >> the hwpoison code has never had to run in that kind of situation and will >> just give up. >> >> That would seem to be sad. It really feels like the obvious solution to any >> MCE's - just map a dummy page at the address that causes problems. >> >> That can have bad effects for real memory (because who knows what internal >> kernel data structure might be in there), but would seem to be the >> _optimal_ solution for some random pmem access. And makes it absolutely >> trivial to just return to the execution that got the error exception. > > The other property of pmem that we need to contend with that makes it > a snowflake relative to typical memory is that errors can be repaired > by sending a slow-path command to the DIMM device. We trap block-layer > writes in the pmem driver that target known 'badblocks' and send the > sideband command to clear the error along with the new data.
All that to say that having a typical RAM page covering poisoned pmem would complicate the 'clear badblocks' implementation.