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

Re: [Xen-devel] Block Device Cache Coherency

To: Michael Vrable <mvrable@xxxxxxxxxxx>
Subject: Re: [Xen-devel] Block Device Cache Coherency
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Wed, 06 Oct 2004 07:59:55 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxxxx, Keir.Fraser@xxxxxxxxxxxx
Delivery-date: Wed, 06 Oct 2004 08:05:01 +0100
Envelope-to: steven.hand@xxxxxxxxxxxx
In-reply-to: Your message of "Tue, 05 Oct 2004 15:47:52 PDT." <20041005154752.A2100@xxxxxxxxxxx>
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>
Sender: xen-devel-admin@xxxxxxxxxxxxxxxxxxxxx
> 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.)

A good question.

You should never have a disc partition mounted by multiple domains,
unless all domains have read-only access. If you follow this rule then
you can't end up with inconsistent stale buffer-cache pages because
they get flushed on umount.

To this end, I think xend does multi-reader single-writer access
control on disc partitions (at least, it used to).

> 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?

Another good question. :-)

There is no shared buffer cache amongst domains, so every domain must
fill its cache separately and this will require a separate set of disc
reads for each domain, even for common data.

If you use a loopback-mounted file ('losetup') or NFS to access
filesystems then you might end up going through DOM0's buffer cache,
which could get you some benefit. BUT the fact would remain that you
still have multiple copies of the shared data, in other domains'
buffer caches (i.e., you'd save some disc accesses, but wouldn't save
any memory).

What would be fun is to come up with a proper shared buffer cache that
allows shared read access amongst domains to a single shared page,
and have a scheme for copy-on-write.

Lots of opportunity for fun and games here: e.g., how to account
shared memory, how to size the shared buffer cache, and doing a nice
comparisons against Xen's current strong isolation model.

 -- Keir


-------------------------------------------------------
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>