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

Re: [Xen-devel] Xen source code structure


  • To: "Yi Wang" <wymail@xxxxxxxxx>,xen-devel@xxxxxxxxxxxxxxxxxxx
  • From: Mats Petersson <mats@xxxxxxxxxxxxxxxxx>
  • Date: Thu, 12 Jul 2007 22:09:20 +0100
  • Delivery-date: Tue, 17 Jul 2007 05:08:25 -0700
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=beta; h=received:x-mailer:date:to:from:subject:in-reply-to:references:mime-version:content-type:sender:message-id; b=HUf2abZyCDfClneIWhhwu2gK8QGJXK+RkP3vohO8/LSck89VqniS8qzWCPz6qmvkON13sC3gGNUJK0ApGCUhQSIntxZbF8Py0DS3sAvrWeLBR/sBRe2MY9rg7/uR14t9KxBM43H53OGucqYUCvkInCRX05qnxS4G9zwqBItXsGc=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

At 21:54 12/07/2007, Yi Wang wrote:
Hello,

Is there any document about the structure of the Xen source code?  I
downloaded the source code from
http://bits.xensource.com/oss-xen/release/3.1.0/src.tgz/xen-3.1.0-src.tgz,
but I had a hard time finding the part of code that handles the live
migration.
Xen is a pretty large project, and understanding where things live can take a bit to understand.


I'm writing this without looking at sources, so please treat any paths as "approximate".

Live migration works with the PV/HVM save-restore concept along with some code to track writes to memory in the relevant page-table handling (in HVM case that would be the .../xen/arch/x86/mm/shadow code - not sure about PV code). Look for "logdirty", as that's the name of the method used to indicate which pages has been written to since the last transfer of "still running" domain.

In the HVM case, the actual save/restore is done by the SVM/VMX code. Not sure about PV-code.

The overall save/restore/migrate is initiated by the "xm" command, which is in .../tools/python/xen/xm/... (I can't remember if there is a "xm_save.py" and "xm_restore.py" or if they are part of the overall "main.py". This code executes a .../tools/xcutil/xc_{save,restore}.c which in turn calls functions in ../tools/libxc/xc_domain_{save,restore}.c

I hope this does give you some idea of where to start looking.

What problem are you trying to solve?

--
Mats


Could anybody give me some hints?

Thanks!

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

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