From: Matthew Wilcox <firstname.lastname@example.org> To: "Luck, Tony" <email@example.com> Cc: Borislav Petkov <firstname.lastname@example.org>, Naoya Horiguchi <email@example.com>, firstname.lastname@example.org, email@example.com, firstname.lastname@example.org, "Darrick J. Wong" <email@example.com>, Jane Chu <firstname.lastname@example.org> Subject: Re: [RFC] Make the memory failure blast radius more precise Date: Tue, 23 Jun 2020 23:17:41 +0100 Message-ID: <20200623221741.GH21350@casper.infradead.org> (raw) In-Reply-To: <20200623220412.GA21232@agluck-desk2.amr.corp.intel.com> On Tue, Jun 23, 2020 at 03:04:12PM -0700, Luck, Tony wrote: > On Tue, Jun 23, 2020 at 09:17:45PM +0100, Matthew Wilcox wrote: > > Hardware actually tells us the blast radius of the error, but we ignore > > it and take out the entire page. We've had a customer request to know > > exactly how much of the page is damaged so they can avoid reconstructing > > an entire 2MB page if only a single cacheline is damaged. > > > > This is only a strawman that I did in an hour or two; I'd appreciate > > architectural-level feedback. Should I just convert memory_failure() to > > always take an address & granularity? Should I create a struct to pass > > around (page, phys, granularity) instead of reconstructing the missing > > pieces in half a dozen functions? Is this functionality welcome at all, > > or is the risk of upsetting applications which expect at least a page > > of granularity too high? > > What is the interface to these applications that want finer granularity? > > Current code does very poorly with hugetlbfs pages ... user loses the > whole 2 MB or 1GB. That's just silly (though I've been told that it is > hard to fix because allowing a hugetlbfs page to be broken up at an arbitrary > time as the result of a mahcine check means that the kernel needs locking > around a bunch of fas paths that currently assume that a huge page will > stay being a huge page). > > For sub-4K page usage, there are different problems. We can't leave the > original page with the poisoned cache line mapped to the user as they may > just access the poison data and trigger another machine check. But if we > map in some different page with all the good bits copied, the user needs > to be aware which parts of the page no longer have their data. This is specifically for DAX. The interface we were hoping to use to fix the error is to leave the mapping in place and call fallocate(fd, FALLOC_FL_ZERO_RANGE, offset, len); The application will then take care of writing actual data that isn't zeroes to the file. Or leave it as zeroes if that's what the application wants to be its error indicator. The fallocate path doesn't work quite right today, but there's no point in trying to fix that up if we can't sort out the delivery of the actual error range. It might also be nice to have an madvise() MADV_ZERO option so the application doesn't have to look up the fd associated with that memory range, but we haven't floated that idea with the customer yet; I just thought of it now.
next prev parent reply index Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-06-23 20:17 Matthew Wilcox 2020-06-23 21:48 ` Dan Williams 2020-06-23 22:04 ` Luck, Tony 2020-06-23 22:17 ` Matthew Wilcox [this message] 2020-06-23 22:26 ` Luck, Tony 2020-06-23 22:40 ` Matthew Wilcox 2020-06-24 0:01 ` Darrick J. Wong 2020-06-24 12:10 ` Matthew Wilcox 2020-06-24 23:21 ` Dan Williams 2020-06-25 0:17 ` Matthew Wilcox 2020-06-25 1:18 ` Dan Williams 2020-06-24 21:22 ` Jane Chu 2020-06-25 0:13 ` Luck, Tony 2020-06-25 16:23 ` Jane Chu 2020-06-24 4:32 ` David Rientjes 2020-06-24 20:57 ` Jane Chu 2020-06-24 22:01 ` David Rientjes 2020-06-25 2:16 ` HORIGUCHI NAOYA(堀口 直也)
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20200623221741.GH21350@casper.infradead.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Linux-EDAC Archive on lore.kernel.org Archives are clonable: git clone --mirror https://lore.kernel.org/linux-edac/0 linux-edac/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 linux-edac linux-edac/ https://lore.kernel.org/linux-edac \ firstname.lastname@example.org public-inbox-index linux-edac Example config snippet for mirrors Newsgroup available over NNTP: nntp://nntp.lore.kernel.org/org.kernel.vger.linux-edac AGPL code for this site: git clone https://public-inbox.org/public-inbox.git