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

Re: [Xen-devel] Sources of page dirtying for HVM domains in Xen 3.2.x

  • To: "Tim Deegan" <Tim.Deegan@xxxxxxxxxx>
  • From: "Mike Sun" <msun@xxxxxxxxxx>
  • Date: Fri, 3 Oct 2008 11:34:30 -0700
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
  • Delivery-date: Fri, 03 Oct 2008 11:34:55 -0700
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=cpvUl3kqkTQd5HkhCNtyIdpQpdpvNAvHSm3mkJptk13kcR/EuvjYsdo4MPcxklsDze qw/ZCa2lw7ZWWpsCDmlTwQeb2Yr6mserEoxk6UhOcsWNDL95dzM1SeZ77GqFnM5J2JoL x3G1dV1hYY1VSriS7LTU2tOTkWQFgoCxPz1BU=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

> And in Xen 3.2 DMA accesses from qemu were completely un-marked (which I
> believe has either been fixed in xen-unstable or else there's a patch on
> the way).  Since qemu already has a wrapper function for its writes to
> guest RAM it's easy to add a hypercall at the top of it.

Meaning that they're not marked dirty at all?  My understanding was
that qemu-dm marked them dirty and that this dirty bitmap for DMA
writes could be accessed.  It seems like that's what the live
migration code uses to check for dirtied pages from qemu dma
(init_qemu_maps(), qemu_flip_buffer()).  I can see a need for a
hypercall when qemu does the dirty marking in its code.  I may just
save myself some trouble and pre-copy those memory pages instead of
letting them be CoW.

> Here's a harder question:  What do you do if you hit a copy-on-write
> fault and don't have any memory available to copy into?  Or are you
> planning to allocate a full domain of memory up-front for VM fork?

I'm actually not aiming for a VM fork, it's for a checkpoint.  Yup,
I'm having dom0 allocate a large enough buffer which I pass to the
hypervisor.  It's a crude approach for now, but I'll optimze it later
with some sort of circular buffer which the checkpoint agent in dom0
can ensure there's always available buffer space.

You've been tremendously helpful in clarifying things for me.  Thanks
again for the help!

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.