Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751777AbXJVJtS (ORCPT ); Mon, 22 Oct 2007 05:49:18 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751706AbXJVJtG (ORCPT ); Mon, 22 Oct 2007 05:49:06 -0400 Received: from one.firstfloor.org ([213.235.205.2]:38784 "EHLO one.firstfloor.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751482AbXJVJtF (ORCPT ); Mon, 22 Oct 2007 05:49:05 -0400 Date: Mon, 22 Oct 2007 11:49:01 +0200 From: Andi Kleen To: Benjamin Herrenschmidt Cc: Andi Kleen , Nick Piggin , David Chinner , Jeremy Fitzhardinge , xfs@oss.sgi.com, Xen-devel , Linux Kernel Mailing List , Mark Williamson , Morten =?iso-8859-1?B?QsO4Z2Vza292?= , xfs-masters@oss.sgi.com Subject: Re: Interaction between Xen and XFS: stray RW mappings Message-ID: <20071022094901.GA28174@one.firstfloor.org> References: <470FA7C3.90404@goop.org> <20071014225618.GN23367404@sgi.com> <200710160056.47458.nickpiggin@yahoo.com.au> <20071015110735.GA11748@one.firstfloor.org> <1193004961.6745.42.camel@pasglop> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1193004961.6745.42.camel@pasglop> User-Agent: Mutt/1.4.2.1i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1512 Lines: 33 On Mon, Oct 22, 2007 at 08:16:01AM +1000, Benjamin Herrenschmidt wrote: > On Mon, 2007-10-15 at 13:07 +0200, Andi Kleen wrote: > > On Tue, Oct 16, 2007 at 12:56:46AM +1000, Nick Piggin wrote: > > > Is this true even if you don't write through those old mappings? > > > > I think it happened for reads too. It is a little counter intuitive > > because in theory the CPU doesn't need to write back non dirty lines, > > but in the one case which took so long to debug exactly this happened > > somehow. > > The problem exist also on ppc, and afaik, is due to the line being in > the cache at all (either dirty (write) or not (read)), thus causing the > snoop logic to hit, that is what's causing the problem vs. non cached > accesses. That makes sense. Snoop can effectively turn a read into a write. > Also, on some processors, the simple fact of having the page mapped can > cause the CPU to prefetch from it even if it's not actually accessed > (speculative prefetch can cross page boundaries if things are mapped). Exactly that happens on x86. Normally prefetches stop on TLB miss, but the CPU can do speculative TLB fetches too. Also even without any prefetching the CPU does speculative execution and that can lead to random addresses being followed. -Andi - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/