WARNING - OLD ARCHIVES

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/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Block Device Cache Coherency

To: xen-devel@xxxxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] Block Device Cache Coherency
From: Michael Vrable <mvrable@xxxxxxxxxxx>
Date: Tue, 5 Oct 2004 15:47:52 -0700
Delivery-date: Tue, 05 Oct 2004 23:53:25 +0100
Envelope-to: steven.hand@xxxxxxxxxxxx
List-archive: <http://sourceforge.net/mailarchive/forum.php?forum=xen-devel>
List-help: <mailto:xen-devel-request@lists.sourceforge.net?subject=help>
List-id: List for Xen developers <xen-devel.lists.sourceforge.net>
List-post: <mailto:xen-devel@lists.sourceforge.net>
List-subscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=subscribe>
List-unsubscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=unsubscribe>
Mail-followup-to: xen-devel@xxxxxxxxxxxxxxxxxxxxx
Sender: xen-devel-admin@xxxxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.2.5.1i
My understanding of the Xen block device backend is that requests from
xenU domains are passed off rather directly to the underlying block
device driver in domain-0, without going through the page/buffer cache.
This leads me to wonder: are situations like the following possible?

  - Domain-0 initializes a disk partition for a new domain.  Some of the
    data is buffered in memory and not immediately flushed to disk.  The
    new domain is started, requests data from the disk, and reads the
    old data because the new data hasn't hit disk yet.
  - Domain-0 had earlier read some data from a disk partition used by
    domain-1 and has this data cached.  Domain-1 writes some changes to
    disk, then shuts down.  A program in domain-0 wishes to look at the
    filesystem used by domain-1.  The changes made by domain-1 have been
    written to disk, but domain-0 doesn't realize its cached data is
    stale and reuses the old data.

Both are cases where there isn't any concurrent access to the device,
but domain-0 could do the wrong thing because it doesn't realize that
domain-1 needs to use or has recently changed the same data.

Does the driver domain (domain-0) do something to prevent cases such as
the above happening, or is this a possible concern?  (I haven't observed
any problems along these lines in real use, but am curious.)

In a related question, if LVM is being used to share a device using
copy-on-write partitions (or even if the same device is being shared
read-only between several domains), will each read from a different
domain require a separate read from disk?  Is there some way to have,
say, domain-0 store some of the data in the page cache so that
subsequent requests for the same physical sectors can be satisfied
immediately, in return for giving up some performance and resource
isolation?

Thanks, and sorry if I'm managing to completely misinterpret how the
device drivers work and asking meaningless questions.

--Michael Vrable


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel

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