From: David Chinner <dgc@sgi.com>
To: Andi Kleen <andi@firstfloor.org>
Cc: "David Chinner" <dgc@sgi.com>,
"Jeremy Fitzhardinge" <jeremy@goop.org>,
"dean gaudet" <dean@arctic.org>,
"Nick Piggin" <nickpiggin@yahoo.com.au>,
Xen-devel <xen-devel@lists.xensource.com>,
Morten@suse.de,
"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
Bøgeskov <xen-users@morten.bogeskov.dk>,
xfs@oss.sgi.com, xfs-masters@oss.sgi.com,
"Mark Williamson" <mark.williamson@cl.cam.ac.uk>
Subject: Re: Interaction between Xen and XFS: stray RW mappings
Date: Tue, 23 Oct 2007 10:36:41 +1000 [thread overview]
Message-ID: <20071023003641.GF995458@sgi.com> (raw)
In-Reply-To: <20071022233514.GA9057@one.firstfloor.org>
On Tue, Oct 23, 2007 at 01:35:14AM +0200, Andi Kleen wrote:
> On Tue, Oct 23, 2007 at 08:32:25AM +1000, David Chinner wrote:
> > On Mon, Oct 22, 2007 at 09:07:40PM +0200, Andi Kleen wrote:
> > > It's hidden now so it causes any obvious failures any more. Just subtle
> > > ones which is much worse.
> >
> > There's no evidence of any problems ever being caused by this code.
.....
> Also the corruption will not be on the XFS side, but on the uncached mapping
> so typically some data sent to some device gets a few corrupted cache line
> sized blocks. Depending on the device this might also not be fatal -- e.g.
> if it is texture data some corrupted pixels occasionally are not that
> visible. But there can be still cases where it can cause real failures when
> it hits something critical (the failures were it was tracked down was
> usually it hitting some command ring and the hardware erroring out)
There seems to be little evidence of that occurring around the place.
> > It's been there for years.
>
> That doesn't mean it is correct.
Right, but it also points to the fact that it's not causing problems
from 99.999% of ppl out there.
> Basically you're saying: I don't care if I corrupt device driver data.
> That's not a very nice thing to say.
No, I did not say that. I said that there's no evidence that points to
this causing problems anywhere.
> > > But why not just disable it? It's not critical functionality, just a
> > > optimization that unfortunately turned out to be incorrect.
> >
> > It is critical functionality for larger machines because vmap()/vunmap()
> > really does suck in terms of scalability.
>
> Critical perhaps, but also broken.
>
> And if it's that big a problem would it be really that difficult to change
> only the time critical paths using it to not? I assume it's only the
> directory code where it is a problem? That would be likely even faster in
> general.
Difficult - yes. All the btree code in XFS would have to be rewritten
to remove the assumption that the buffer structures are contiguous in
memory. Any bug we introduce in doing this will result in on disk corruption,
which is far worse than occasionally crashing a machine with a stray
mapping.
> > > It could be made correct short term by not freeing the pages until
> > > vunmap for example.
> >
> > Could vmap()/vunmap() take references to the pages that are mapped? That
> > way delaying the unmap would also delay the freeing of the pages and hence
> > we'd have no problems with the pages being reused before the mapping is
> > torn down. That'd work for Xen even with XFS's lazy unmapping scheme, and
> > would allow Nick's more advanced methods to work as well....
>
> You could always just keep around an array of the pages and then drop the
> reference count after unmap. Or walk the vmalloc mapping and generate such
> an array before freeing, then unmap and then drop the reference counts.
You mean like vmap() could record the pages passed to it in the area->pages
array, and we walk and release than in __vunmap() like it already does
for vfree()?
If we did this, it would probably be best to pass a page release function
into the vmap or vunmap call - we'd need page_cache_release() called on
the page rather than __free_page()....
The solution belongs behind the vmap/vunmap interface, not in XFS....
Cheers,
Dave.
--
Dave Chinner
Principal Engineer
SGI Australian Software Group
next prev parent reply other threads:[~2007-10-23 0:37 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-12 16:58 Interaction between Xen and XFS: stray RW mappings Jeremy Fitzhardinge
2007-10-12 17:08 ` Jeremy Fitzhardinge
2007-10-14 22:56 ` David Chinner
2007-10-14 23:12 ` Jeremy Fitzhardinge
2007-10-14 23:33 ` David Chinner
2007-10-15 4:15 ` Nick Piggin
2007-10-15 0:57 ` Jeremy Fitzhardinge
2007-10-15 7:26 ` Nick Piggin
2007-10-15 3:42 ` Jeremy Fitzhardinge
2007-10-15 4:11 ` David Chinner
2007-10-15 4:18 ` Jeremy Fitzhardinge
2007-10-15 4:25 ` David Chinner
2007-10-15 8:31 ` [xfs-masters] " Christoph Hellwig
2007-10-22 3:18 ` dean gaudet
2007-10-22 3:34 ` Jeremy Fitzhardinge
2007-10-22 4:28 ` dean gaudet
2007-10-22 4:39 ` Nick Piggin
2007-10-22 18:37 ` Jeremy Fitzhardinge
2007-10-22 18:32 ` Jeremy Fitzhardinge
2007-10-22 13:47 ` Andi Kleen
2007-10-22 18:40 ` Jeremy Fitzhardinge
2007-10-22 19:07 ` Andi Kleen
2007-10-22 19:11 ` Jeremy Fitzhardinge
2007-10-22 22:32 ` David Chinner
2007-10-22 23:35 ` Andi Kleen
2007-10-23 0:16 ` Zachary Amsden
2007-10-23 0:36 ` David Chinner [this message]
2007-10-23 7:04 ` [patch] " David Chinner
2007-10-23 9:30 ` Andi Kleen
2007-10-23 12:41 ` David Chinner
2007-10-23 14:33 ` Jeremy Fitzhardinge
2007-10-24 4:36 ` [PATCH] Allow lazy unmapping by taking extra page references V2 David Chinner
2007-10-24 5:08 ` Jeremy Fitzhardinge
2007-10-24 21:48 ` [PATCH] Allow lazy unmapping by taking extra page references V3 David Chinner
2007-10-24 22:46 ` Jeremy Fitzhardinge
2007-10-24 23:21 ` David Chinner
2007-10-23 9:28 ` Interaction between Xen and XFS: stray RW mappings Andi Kleen
2007-10-15 9:36 ` Andi Kleen
2007-10-15 14:56 ` Nick Piggin
2007-10-15 11:07 ` Andi Kleen
2007-10-15 11:28 ` Nick Piggin
2007-10-15 12:54 ` Andi Kleen
2007-10-21 12:17 ` Dave Airlie
2007-10-21 22:16 ` Benjamin Herrenschmidt
2007-10-22 9:49 ` Andi Kleen
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=20071023003641.GF995458@sgi.com \
--to=dgc@sgi.com \
--cc=Morten@suse.de \
--cc=andi@firstfloor.org \
--cc=dean@arctic.org \
--cc=jeremy@goop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.williamson@cl.cam.ac.uk \
--cc=nickpiggin@yahoo.com.au \
--cc=xen-devel@lists.xensource.com \
--cc=xen-users@morten.bogeskov.dk \
--cc=xfs-masters@oss.sgi.com \
--cc=xfs@oss.sgi.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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox