qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC][PATCH] File-backed memory maps


From: Jamie Lokier
Subject: Re: [Qemu-devel] [RFC][PATCH] File-backed memory maps
Date: Fri, 18 Sep 2009 17:10:35 +0100
User-agent: Mutt/1.5.13 (2006-08-11)

Nathan Baum wrote:
> > On architectures other than x86, sometimes data written by one process
> > is not visible to another process mapping the same file, until the
> > writing process flushes it's cache for those pages.  Whether that's
> > necessary depends on the address that pages are mapped to.  Afaik,
> > normally Linux chooses an address where this issue is avoided, but if
> > you specify it with MAP_FIXED (or whatever KVM does to map pages),
> > then there's cache coherency to deal with.

I missed out something important: Not only does the writing process
have to clean it's cache (write dirty cachelines); the reading process
has to invalidate it's cache too.

At the system call level, that means the reading process must call
msync().  Until it does that, it may still see some of the data
change, but it's not guaranteed to see all the changes.

If the writer's copying from QEMU's VRAM to a copy, during that copy,
the reading process will see something uncertain; probably not very
useful for a VNC server.  They would need to coordinate this.  Not
sure if that buys anything over whatever KVM has to do already :-)

RDP server add-ons etc. are a good idea, imho, but perhaps can be
implemented as a shared library loaded into qemu?

-- Jamie





reply via email to

[Prev in Thread] Current Thread [Next in Thread]