From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jacob Gorm Hansen Subject: Re: Invalidating buffer cache in dom0 Date: Sun, 29 May 2005 02:04:09 -0700 Message-ID: <42998589.3030501@diku.dk> References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed 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: Ian Pratt Cc: xen-devel List-Id: xen-devel@lists.xenproject.org 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. It is my impression that in recent 2.6 kernels raw devices and O_DIRECT are the same thing. Actually, I was forced to use O_DIRECT inside my domU for the self-checkpointing, as otherwise the buffer cache would inflate the working set and create additional downtime. O_DIRECT works really well, and minus a ton of bugs I can now self-checkpoint to disk as well as self-migrate via the network. O_DIRECT works for writes. However, it seems it still tries to be a little too clever when reading from a blockdev. This is not a huge prob for me, just an annoyance that I have to reboot all the time to flush the cache, but I guess that for a Xen system in general it would be nice to have consistency of block device contents between domUs and dom0. thanks, Jacob