From: Jeremy Fitzhardinge Subject: Re: Interaction between Xen and XFS: stray RW mappings Date: Mon, 22 Oct 2007 11:40:52 -0700 Message-ID: <471CEEB4.9040807@goop.org> References: <470FA7C3.90404@goop.org> <20071014225618.GN23367404@sgi.com> <4712A254.4090604@goop.org> <200710151415.07248.nickpiggin@yahoo.com.au> <471C1A61.1010001@goop.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Andi Kleen Cc: Nick Piggin , dean gaudet , David Chinner , Linux Kernel Mailing List , =?ISO-8859-1?Q?B=F8geskov?= , xfs@oss.sgi.com, xfs-masters@oss.sgi.com, Xen-devel , Morten@suse.de, Mark Williamson List-Id: xen-devel@lists.xenproject.org Andi Kleen wrote: > Jeremy Fitzhardinge writes: > >> Yes, that's precisely the problem. xfs does delay the unmap, leaving >> stray mappings, which upsets Xen. >> > > Again it not just upsets Xen, keeping mappings to freed pages is wrong generally > and violates the x86 (and likely others like PPC) architecture because it can > cause illegal caching attribute aliases. > > The patch that went into the tree was really not correct -- this > bogus optimization should have been unconditionally removed > or if you really wanted an ifdef made dependent on !CONFIG_XEN && > !CONFIG_AGP (and likely && !CONFIG_DRM && !CONFIG_anything else that > uses uncached mappings in memory). > > You just worked around the obvious failure and leave the non obvious > rare corruptions in, which isn't a good strategy. Well, at least it becomes a known issue and/or placeholder for when Nick does his grand unified vmap manager. I guess a clean workaround would be to add a CONFIG_XFS_LAZY_UNMAP, and do it at the Kconfig level... I'll cook up a patch. J