This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


Re: [Xen-devel] Invalidating buffer cache in dom0

To: "Ian Pratt" <m+Ian.Pratt@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] Invalidating buffer cache in dom0
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Sat, 28 May 2005 21:07:51 +0100
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Jacob Gorm Hansen <jacobg@xxxxxxx>
Delivery-date: Sat, 28 May 2005 20:10:27 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <A95E2296287EAD4EB592B5DEEFCE0E9D281F4C@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <A95E2296287EAD4EB592B5DEEFCE0E9D281F4C@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx

On 28 May 2005, at 19:49, Ian Pratt wrote:

Have you tried using raw devices? See "man raw". I've never used them,
but I'd be interested to know whether this works. There's an argument
that we should be using them by default, particularly for people using
using cluster filesystems -- caching stuff in dom0 could be very bad.

This isn't a problem for domU virtual blkdevs: our backend driver doesn't hook into the page cache, so unless the block device it sends requests to loops back to the page cache then we will not be affected by stale buffer cache contents.

Jacob has given a domU direct access to a partition as a virtual blkdev. It has modified it, and the updates did go straight to disc. But if dom0 tries to read partition contents itself then it sees stale page cache data (because the backend completely circumvented the page cache). I'm surprised that O_DIRECT didn't fix the problem -- I suppose it's being 'too clever' in this case and checking for potentially dirty pages in the cache before going direct to disc.

 -- Keir

Xen-devel mailing list

<Prev in Thread] Current Thread [Next in Thread>