Re: Interaction between Xen and XFS: stray RW mappings

Andi Kleen
2007-10-22T13:47:37Z

Jeremy Fitzhardinge <jeremy@goop.org> 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.

-Andi