All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Isaku Yamahata <yamahata@valinux.co.jp>
Cc: kvm@vger.kernel.org, qemu-devel@nongnu.org,
	t.hirofuchi@aist.go.jp, satoshi.itoh@aist.go.jp,
	Andrea Arcangeli <aarcange@redhat.com>
Subject: Re: [RFC] postcopy livemigration proposal
Date: Wed, 10 Aug 2011 16:55:32 +0300	[thread overview]
Message-ID: <4E428DD4.9030806@redhat.com> (raw)
In-Reply-To: <20110809023305.GG25667@valinux.co.jp>

On 08/09/2011 05:33 AM, Isaku Yamahata wrote:
> On Mon, Aug 08, 2011 at 03:38:54PM +0300, Avi Kivity wrote:
> >  On 08/08/2011 06:24 AM, Isaku Yamahata wrote:
> >>  This mail is on "Yabusame: Postcopy Live Migration for Qemu/KVM"
> >>  on which we'll give a talk at KVM-forum.
> >>  The purpose of this mail is to letting developers know it in advance
> >>  so that we can get better feedback on its design/implementation approach
> >>  early before our starting to implement it.
> >
> >  Interesting; what is the impact of increased latency on memory reads?
>
> Many people has already discussed it much in another thread. :-)
> That's much more than I expected.

Can you point me to the discussion?

>
> >>  There are several design points.
> >>     - who takes care of pulling page contents.
> >>       an independent daemon vs a thread in qemu
> >>       The daemon approach is preferable because an independent daemon would
> >>       easy for debug postcopy memory mechanism without qemu.
> >>       If required, it wouldn't be difficult to convert a daemon into
> >>       a thread in qemu
> >
> >  Isn't this equivalent to touching each page in sequence?
>
> No. I don't get your point of this question.

If you have a qemu thread that does

    for (each guest page)
        sum += *(char *)page;

doesn't that effectively pull all pages from the source node?

(but maybe I'm assuming that the kernel takes care of things and this 
isn't the case?)

> >>
> >>     - hooking guest RAM access
> >>       Introduce a character device to handle page fault.
> >>       When page fault occurs, it queues page request up to user space daemon
> >>       at the destination. And the daemon pulls page contents from the source
> >>       and serves it into the character device. Then the page fault is resovlved.
> >
> >  This doesn't play well with host swapping, transparent hugepages, or
> >  ksm, does it?
>
> No. At least it wouldn't be so difficult to fix it, I haven't looked ksm,
> thp so closely though.
> Although the vma is backed by the device, the populated page is
> anonymous. (by MMAP_PRIVATE or the deriver returning anonymous page)
> So swapping, thp, ksm should work.

I'm not 100% sure, but I think that thp and ksm need the vma to be 
anonymous, not just the page.

> >
> >  It would need to be a special kind of swap device since we only want to
> >  swap in, and never out, to that device.  We'd also need a special way of
> >  telling the kernel that memory comes from that device.  In that it's
> >  similar your second option.
> >
> >  Maybe we should use a backing file (using nbd) and have a madvise() call
> >  that converts the vma to anonymous memory once the migration is finished.
>
> With whichever options, I'd like to convert the vma into anonymous area
> after the migration completes somehow. i.e. nulling vma->vm_ops.
> (The pages are already anonymous.)
>
> It seems troublesome involving complicated races/lockings. So I'm not sure
> it's worthwhile.

Andrea, what's your take on this?

-- 
error compiling committee.c: too many arguments to function


WARNING: multiple messages have this Message-ID (diff)
From: Avi Kivity <avi@redhat.com>
To: Isaku Yamahata <yamahata@valinux.co.jp>
Cc: Andrea Arcangeli <aarcange@redhat.com>,
	t.hirofuchi@aist.go.jp, qemu-devel@nongnu.org,
	kvm@vger.kernel.org, satoshi.itoh@aist.go.jp
Subject: Re: [Qemu-devel] [RFC] postcopy livemigration proposal
Date: Wed, 10 Aug 2011 16:55:32 +0300	[thread overview]
Message-ID: <4E428DD4.9030806@redhat.com> (raw)
In-Reply-To: <20110809023305.GG25667@valinux.co.jp>

On 08/09/2011 05:33 AM, Isaku Yamahata wrote:
> On Mon, Aug 08, 2011 at 03:38:54PM +0300, Avi Kivity wrote:
> >  On 08/08/2011 06:24 AM, Isaku Yamahata wrote:
> >>  This mail is on "Yabusame: Postcopy Live Migration for Qemu/KVM"
> >>  on which we'll give a talk at KVM-forum.
> >>  The purpose of this mail is to letting developers know it in advance
> >>  so that we can get better feedback on its design/implementation approach
> >>  early before our starting to implement it.
> >
> >  Interesting; what is the impact of increased latency on memory reads?
>
> Many people has already discussed it much in another thread. :-)
> That's much more than I expected.

Can you point me to the discussion?

>
> >>  There are several design points.
> >>     - who takes care of pulling page contents.
> >>       an independent daemon vs a thread in qemu
> >>       The daemon approach is preferable because an independent daemon would
> >>       easy for debug postcopy memory mechanism without qemu.
> >>       If required, it wouldn't be difficult to convert a daemon into
> >>       a thread in qemu
> >
> >  Isn't this equivalent to touching each page in sequence?
>
> No. I don't get your point of this question.

If you have a qemu thread that does

    for (each guest page)
        sum += *(char *)page;

doesn't that effectively pull all pages from the source node?

(but maybe I'm assuming that the kernel takes care of things and this 
isn't the case?)

> >>
> >>     - hooking guest RAM access
> >>       Introduce a character device to handle page fault.
> >>       When page fault occurs, it queues page request up to user space daemon
> >>       at the destination. And the daemon pulls page contents from the source
> >>       and serves it into the character device. Then the page fault is resovlved.
> >
> >  This doesn't play well with host swapping, transparent hugepages, or
> >  ksm, does it?
>
> No. At least it wouldn't be so difficult to fix it, I haven't looked ksm,
> thp so closely though.
> Although the vma is backed by the device, the populated page is
> anonymous. (by MMAP_PRIVATE or the deriver returning anonymous page)
> So swapping, thp, ksm should work.

I'm not 100% sure, but I think that thp and ksm need the vma to be 
anonymous, not just the page.

> >
> >  It would need to be a special kind of swap device since we only want to
> >  swap in, and never out, to that device.  We'd also need a special way of
> >  telling the kernel that memory comes from that device.  In that it's
> >  similar your second option.
> >
> >  Maybe we should use a backing file (using nbd) and have a madvise() call
> >  that converts the vma to anonymous memory once the migration is finished.
>
> With whichever options, I'd like to convert the vma into anonymous area
> after the migration completes somehow. i.e. nulling vma->vm_ops.
> (The pages are already anonymous.)
>
> It seems troublesome involving complicated races/lockings. So I'm not sure
> it's worthwhile.

Andrea, what's your take on this?

-- 
error compiling committee.c: too many arguments to function

  reply	other threads:[~2011-08-10 13:55 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-08  3:24 [RFC] postcopy livemigration proposal Isaku Yamahata
2011-08-08  3:24 ` [Qemu-devel] " Isaku Yamahata
2011-08-08  9:20 ` Dor Laor
2011-08-08  9:20   ` [Qemu-devel] " Dor Laor
2011-08-08  9:40   ` Yaniv Kaul
2011-08-08  9:40     ` [Qemu-devel] " Yaniv Kaul
2011-08-08 21:42     ` Anthony Liguori
2011-08-08 21:42       ` Anthony Liguori
2011-08-08 10:59   ` Nadav Har'El
2011-08-08 10:59     ` [Qemu-devel] " Nadav Har'El
2011-08-08 11:47     ` Dor Laor
2011-08-08 11:47       ` [Qemu-devel] " Dor Laor
2011-08-08 16:52       ` Cleber Rosa
2011-08-08 15:52         ` Anthony Liguori
2011-08-08 12:32   ` Anthony Liguori
2011-08-08 12:32     ` [Qemu-devel] " Anthony Liguori
2011-08-08 15:11     ` Dor Laor
2011-08-08 15:11       ` Dor Laor
2011-08-08 15:29       ` Anthony Liguori
2011-08-08 15:29         ` Anthony Liguori
2011-08-08 15:36         ` Avi Kivity
2011-08-08 15:36           ` [Qemu-devel] " Avi Kivity
2011-08-08 15:59           ` Anthony Liguori
2011-08-08 15:59             ` Anthony Liguori
2011-08-08 19:47             ` Dor Laor
2011-08-08 19:47               ` [Qemu-devel] " Dor Laor
2011-08-09  2:07               ` Isaku Yamahata
2011-08-09  2:07                 ` Isaku Yamahata
2011-08-08  9:38 ` Stefan Hajnoczi
2011-08-08  9:38   ` Stefan Hajnoczi
2011-08-08  9:43   ` Isaku Yamahata
2011-08-08  9:43     ` Isaku Yamahata
2011-08-08 12:38 ` Avi Kivity
2011-08-08 12:38   ` [Qemu-devel] " Avi Kivity
2011-08-09  2:33   ` Isaku Yamahata
2011-08-09  2:33     ` [Qemu-devel] " Isaku Yamahata
2011-08-10 13:55     ` Avi Kivity [this message]
2011-08-10 13:55       ` Avi Kivity
2011-08-11  2:19       ` Isaku Yamahata
2011-08-11  2:19         ` [Qemu-devel] " Isaku Yamahata
2011-08-11 16:55         ` Andrea Arcangeli
2011-08-11 16:55           ` [Qemu-devel] " Andrea Arcangeli
2011-08-12 11:07 ` [PATCH][RFC] post copy chardevice (was Re: [RFC] postcopy livemigration proposal) Isaku Yamahata
2011-08-12 11:07   ` [Qemu-devel] " Isaku Yamahata
2011-08-12 11:09   ` Isaku Yamahata
2011-08-12 11:09     ` [Qemu-devel] " Isaku Yamahata
2011-08-12 21:26   ` Blue Swirl
2011-08-12 21:26     ` Blue Swirl
2011-08-15 19:29   ` Avi Kivity
2011-08-15 19:29     ` [Qemu-devel] " Avi Kivity
2011-08-16  1:42     ` Isaku Yamahata
2011-08-16  1:42       ` [Qemu-devel] " Isaku Yamahata
2011-08-16 13:40       ` Avi Kivity
2011-08-16 13:40         ` [Qemu-devel] " Avi Kivity

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E428DD4.9030806@redhat.com \
    --to=avi@redhat.com \
    --cc=aarcange@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=qemu-devel@nongnu.org \
    --cc=satoshi.itoh@aist.go.jp \
    --cc=t.hirofuchi@aist.go.jp \
    --cc=yamahata@valinux.co.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.