All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] stubdom-dm: Support live migration of HVM domain with stubdom-dm
@ 2008-12-16  9:22 Yosuke Iwamatsu
  2008-12-16 10:02 ` Samuel Thibault
  0 siblings, 1 reply; 9+ messages in thread
From: Yosuke Iwamatsu @ 2008-12-16  9:22 UTC (permalink / raw)
  To: xen-devel; +Cc: samuel.thibault, Keir Fraser

Hi,

This series of patches is an attempt to support live migration of hvm
domains with stubdom-dm.

For hvm domains to live-migrate, we should create a log-dirty shared
memory segment between xc_save and qemu-dm. for a normal qemu-dm,
memory sharing is done by inter process communication interface
(shmget/shmat/shmctl), but it obviously doesn't work for a stubdom-dm
because it is not a dom0 process but a domain itself.

The idea here is to allocate log-dirty the shared memory segment in
the stubdom-dm and to map the memory region into the xc_save process
by using grant table interface.

[PATCH 1/4] mini-os: Make utility function get_self_id() public
[PATCH 2/4] Log-dirty shared memory between stubdom-dm and xc_save
[PATCH 3/4] Log-dirty shared memory between stubdom-dm and xc_save
            (ioemu-remote part)
[PATCH 4/4] xend: Give stubdom flag to xc_save

Thanks,
-----------------------
Yosuke Iwamatsu
        NEC Corporation

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 0/4] stubdom-dm: Support live migration of HVM domain with stubdom-dm
  2008-12-16  9:22 [PATCH 0/4] stubdom-dm: Support live migration of HVM domain with stubdom-dm Yosuke Iwamatsu
@ 2008-12-16 10:02 ` Samuel Thibault
  2008-12-16 10:06   ` Samuel Thibault
  2008-12-16 14:04   ` Ian Jackson
  0 siblings, 2 replies; 9+ messages in thread
From: Samuel Thibault @ 2008-12-16 10:02 UTC (permalink / raw)
  To: Yosuke Iwamatsu; +Cc: xen-devel, Keir Fraser

Yosuke Iwamatsu, le Tue 16 Dec 2008 18:22:20 +0900, a écrit :
> This series of patches is an attempt to support live migration of hvm
> domains with stubdom-dm.

Err, I'm a bit surprised. I haven't tested it since then, but I'm sure
live migration was working with stubdoms a few months ago, without
the need for a logdirty shared buffer.  This works thanks to the few
lines at the end of the cpu_physical_memory_rw() function that tell the
hypervisor about modified memory.  Actually, the plan was even to use
that bit of code in all cases (not only non-stubdom), so as to get rid
of the logdirty shared buffer completely.

Samuel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 0/4] stubdom-dm: Support live migration of HVM domain with stubdom-dm
  2008-12-16 10:02 ` Samuel Thibault
@ 2008-12-16 10:06   ` Samuel Thibault
  2008-12-16 14:04   ` Ian Jackson
  1 sibling, 0 replies; 9+ messages in thread
From: Samuel Thibault @ 2008-12-16 10:06 UTC (permalink / raw)
  To: Yosuke Iwamatsu, xen-devel, Keir Fraser

Samuel Thibault, le Tue 16 Dec 2008 11:02:31 +0100, a écrit :
> Actually, the plan was even to use that bit of code in all cases (not
> only non-stubdom), so as to get rid of the logdirty shared buffer
> completely.

(That even _helps_ the shadow code, which can thus know that a pagetable
was replaced by data from the disk, for instance.)

Samuel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Re: [PATCH 0/4] stubdom-dm: Support live migration of HVM domain with stubdom-dm
  2008-12-16 10:02 ` Samuel Thibault
  2008-12-16 10:06   ` Samuel Thibault
@ 2008-12-16 14:04   ` Ian Jackson
  2008-12-16 14:16     ` Samuel Thibault
  2008-12-17  1:06     ` Yosuke Iwamatsu
  1 sibling, 2 replies; 9+ messages in thread
From: Ian Jackson @ 2008-12-16 14:04 UTC (permalink / raw)
  To: Samuel Thibault; +Cc: xen-devel, Yosuke Iwamatsu, Keir Fraser

Samuel Thibault writes ("[Xen-devel] Re: [PATCH 0/4] stubdom-dm: Support live migration of HVM domain with stubdom-dm"):
> Yosuke Iwamatsu, le Tue 16 Dec 2008 18:22:20 +0900, a écrit :
> > This series of patches is an attempt to support live migration of hvm
> > domains with stubdom-dm.
> 
> Err, I'm a bit surprised. I haven't tested it since then, but I'm sure
> live migration was working with stubdoms a few months ago, without
> the need for a logdirty shared buffer.  This works thanks to the few
> lines at the end of the cpu_physical_memory_rw() function that tell the
> hypervisor about modified memory.  Actually, the plan was even to use
> that bit of code in all cases (not only non-stubdom), so as to get rid
> of the logdirty shared buffer completely.

I take it you're referring to this:

#ifdef CONFIG_STUBDOM
    if (logdirty_bitmap != NULL)
        xc_hvm_modified_memory(xc_handle, domid, _addr >> TARGET_PAGE_BITS,
                ((_addr + _len + TARGET_PAGE_SIZE - 1) >> TARGET_PAGE_BITS)
                    - (_addr >> TARGET_PAGE_BITS));
#endif

Yosuke Iwamatsu: is this not working for you then ?  It's possible
that I've broken it somehow.

Ian.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Re: [PATCH 0/4] stubdom-dm: Support live migration of HVM domain with stubdom-dm
  2008-12-16 14:04   ` Ian Jackson
@ 2008-12-16 14:16     ` Samuel Thibault
  2008-12-17  1:06     ` Yosuke Iwamatsu
  1 sibling, 0 replies; 9+ messages in thread
From: Samuel Thibault @ 2008-12-16 14:16 UTC (permalink / raw)
  To: Ian Jackson; +Cc: xen-devel, Yosuke Iwamatsu, Keir Fraser

Ian Jackson, le Tue 16 Dec 2008 14:04:53 +0000, a écrit :
> Samuel Thibault writes ("[Xen-devel] Re: [PATCH 0/4] stubdom-dm: Support live migration of HVM domain with stubdom-dm"):
> > This works thanks to the few lines at the end of the
> > cpu_physical_memory_rw() function that tell the hypervisor about
> > modified memory.  Actually, the plan was even to use that bit of
> > code in all cases (not only non-stubdom), so as to get rid of the
> > logdirty shared buffer completely.
> 
> I take it you're referring to this:
> 
> #ifdef CONFIG_STUBDOM
>     if (logdirty_bitmap != NULL)
>         xc_hvm_modified_memory(xc_handle, domid, _addr >> TARGET_PAGE_BITS,
>                 ((_addr + _len + TARGET_PAGE_SIZE - 1) >> TARGET_PAGE_BITS)
>                     - (_addr >> TARGET_PAGE_BITS));
> #endif

Yes, precisely.

Samuel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Re: [PATCH 0/4] stubdom-dm: Support live migration of HVM domain with stubdom-dm
  2008-12-16 14:04   ` Ian Jackson
  2008-12-16 14:16     ` Samuel Thibault
@ 2008-12-17  1:06     ` Yosuke Iwamatsu
  2008-12-17  1:28       ` Samuel Thibault
  2008-12-17 11:39       ` Ian Jackson
  1 sibling, 2 replies; 9+ messages in thread
From: Yosuke Iwamatsu @ 2008-12-17  1:06 UTC (permalink / raw)
  To: Ian Jackson, Samuel Thibault; +Cc: xen-devel, Keir Fraser

[-- Attachment #1: Type: text/plain, Size: 1605 bytes --]

Ian Jackson wrote:
> Samuel Thibault writes ("[Xen-devel] Re: [PATCH 0/4] stubdom-dm: Support live migration of HVM domain with stubdom-dm"):
>> Yosuke Iwamatsu, le Tue 16 Dec 2008 18:22:20 +0900, a écrit :
>>> This series of patches is an attempt to support live migration of hvm
>>> domains with stubdom-dm.
>> Err, I'm a bit surprised. I haven't tested it since then, but I'm sure
>> live migration was working with stubdoms a few months ago, without
>> the need for a logdirty shared buffer.  This works thanks to the few
>> lines at the end of the cpu_physical_memory_rw() function that tell the
>> hypervisor about modified memory.  Actually, the plan was even to use
>> that bit of code in all cases (not only non-stubdom), so as to get rid
>> of the logdirty shared buffer completely.
> 
> I take it you're referring to this:
> 
> #ifdef CONFIG_STUBDOM
>     if (logdirty_bitmap != NULL)
>         xc_hvm_modified_memory(xc_handle, domid, _addr >> TARGET_PAGE_BITS,
>                 ((_addr + _len + TARGET_PAGE_SIZE - 1) >> TARGET_PAGE_BITS)
>                     - (_addr >> TARGET_PAGE_BITS));
> #endif

Ah, I didn't notice this.

> Yosuke Iwamatsu: is this not working for you then ?  It's possible
> that I've broken it somehow.

Live-migration fails because stubdom-dm doesn't respond to the request
from xc_save for the logdirty bitmap segment. The attached patch
simply generated from old ioemu tree will fix the issue, then.

Derived from old xen internal tools/ioemu tree.
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>

Thanks,
-- Yosuke

[-- Attachment #2: stubdom_respond_to_logdirty_event.patch --]
[-- Type: all/allfiles, Size: 1360 bytes --]

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Re: [PATCH 0/4] stubdom-dm: Support live migration of HVM domain with stubdom-dm
  2008-12-17  1:06     ` Yosuke Iwamatsu
@ 2008-12-17  1:28       ` Samuel Thibault
  2008-12-17 11:39       ` Ian Jackson
  1 sibling, 0 replies; 9+ messages in thread
From: Samuel Thibault @ 2008-12-17  1:28 UTC (permalink / raw)
  To: Yosuke Iwamatsu; +Cc: xen-devel, Ian Jackson, Keir Fraser

Yosuke Iwamatsu, le Wed 17 Dec 2008 10:06:10 +0900, a écrit :
> The attached patch
> simply generated from old ioemu tree will fix the issue, then.

> Derived from old xen internal tools/ioemu tree.
> Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>

Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Re: [PATCH 0/4] stubdom-dm: Support live migration of HVM domain with stubdom-dm
  2008-12-17  1:06     ` Yosuke Iwamatsu
  2008-12-17  1:28       ` Samuel Thibault
@ 2008-12-17 11:39       ` Ian Jackson
  2008-12-17 13:14         ` Samuel Thibault
  1 sibling, 1 reply; 9+ messages in thread
From: Ian Jackson @ 2008-12-17 11:39 UTC (permalink / raw)
  To: Yosuke Iwamatsu; +Cc: Samuel Thibault, xen-devel, Keir Fraser

Yosuke Iwamatsu writes ("Re: [Xen-devel] Re: [PATCH 0/4] stubdom-dm: Support live migration of	HVM domain with stubdom-dm"):
> Live-migration fails because stubdom-dm doesn't respond to the request
> from xc_save for the logdirty bitmap segment. The attached patch
> simply generated from old ioemu tree will fix the issue, then.

Thanks, applied.  I take it this should be backported to 3.3 ?

Ian.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Re: [PATCH 0/4] stubdom-dm: Support live migration of HVM domain with stubdom-dm
  2008-12-17 11:39       ` Ian Jackson
@ 2008-12-17 13:14         ` Samuel Thibault
  0 siblings, 0 replies; 9+ messages in thread
From: Samuel Thibault @ 2008-12-17 13:14 UTC (permalink / raw)
  To: Ian Jackson; +Cc: xen-devel, Yosuke Iwamatsu, Keir Fraser

Ian Jackson, le Wed 17 Dec 2008 11:39:46 +0000, a écrit :
> Yosuke Iwamatsu writes ("Re: [Xen-devel] Re: [PATCH 0/4] stubdom-dm: Support live migration of	HVM domain with stubdom-dm"):
> > Live-migration fails because stubdom-dm doesn't respond to the request
> > from xc_save for the logdirty bitmap segment. The attached patch
> > simply generated from old ioemu tree will fix the issue, then.
> 
> Thanks, applied.  I take it this should be backported to 3.3 ?

Yes (though in 3.3 the in-tree qemu is used by default).

Samuel

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2008-12-17 13:14 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-16  9:22 [PATCH 0/4] stubdom-dm: Support live migration of HVM domain with stubdom-dm Yosuke Iwamatsu
2008-12-16 10:02 ` Samuel Thibault
2008-12-16 10:06   ` Samuel Thibault
2008-12-16 14:04   ` Ian Jackson
2008-12-16 14:16     ` Samuel Thibault
2008-12-17  1:06     ` Yosuke Iwamatsu
2008-12-17  1:28       ` Samuel Thibault
2008-12-17 11:39       ` Ian Jackson
2008-12-17 13:14         ` Samuel Thibault

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.