From: Christian Pinto <c.pinto@virtualopensystems.com>
To: Hailiang Zhang <zhang.zhanghailiang@huawei.com>,
Andrea Arcangeli <aarcange@redhat.com>,
Juan Quintela <quintela@redhat.com>,
dgilbert@redhat.com
Cc: xuquan8@huawei.com, peter.huangpeng@huawei.com,
Baptiste Reynal <b.reynal@virtualopensystems.com>,
qemu list <qemu-devel@nongnu.org>,
"Huangweidong (C)" <weidong.huang@huawei.com>,
colo-ft@hotmail.com
Subject: Re: [Qemu-devel] [RFC 00/13] Live memory snapshot based on userfaultfd
Date: Tue, 28 Feb 2017 09:30:43 +0100 [thread overview]
Message-ID: <3d86610f-a7e6-e0ff-a641-9168b9ef5437@virtualopensystems.com> (raw)
In-Reply-To: <58B4D6EA.5050804@huawei.com>
Thanks a lot Hailiang
On 28/02/2017 02:48, Hailiang Zhang wrote:
> Hi,
>
> On 2017/2/27 23:37, Christian Pinto wrote:
>> Hello Hailiang,
>>
>> are there any updates on this patch series? Are you planning to release
>> a new version?
>>
>
> No, userfaultfd still does not support write-protect for KVM.
> You can see the newest discussion about it here:
> https://lists.gnu.org/archive/html/qemu-devel/2016-12/msg01127.html
>
Yes, I have read that part of the discussion and quickly managed to
reproduce the "Bad address" on ARMv8.
>> You say there are some issues with the current snapshot-v2 version,
>> which issues were you referring to? On my side the only problem I have
>> seen was that the live snapshot was not working on ARMv8, but I have
>> fixed that and managed to successfully snapshot and restore a QEMU ARMv8
>> tcg machine on an ARMv8 host. I will gladly contribute with these fixes
>> once you will release a new version of the patches.
>>
>
> Yes, for current implementing of live snapshot, it supports tcg,
> but does not support kvm mode, the reason i have mentioned above,
> if you try to implement it, i think you need to start from userfaultfd
> supporting KVM. There is scenario for it, But I'm blocked by other things
> these days. I'm glad to discuss with you if you planed to do it.
>
I will have a deeper look at why userfault is not yet working with KVM
and get back on this thread for feedback/suggestions.
Thanks,
Christian
> Thanks.
> Hailiang
>
>>
>> Thanks a lot,
>>
>> Christian
>>
>> On 20/08/2016 08:31, Hailiang Zhang wrote:
>>> Hi,
>>>
>>> I updated this series, but didn't post it, because there are some
>>> problems while i tested the snapshot function.
>>> I didn't know if it is the userfaultfd issue or not.
>>> I don't have time to investigate it this month. I have put them in
>>> github
>>> https://github.com/coloft/qemu/tree/snapshot-v2
>>>
>>> Anyone who want to test and modify it are welcomed!
>>>
>>> Besides, will you join the linuxcon or KVM forum in Canada ?
>>> I wish to see you there if you join the conference ;)
>>>
>>> Thanks,
>>> Hailiang
>>>
>>>
>>>
>>> On 2016/8/18 23:56, Andrea Arcangeli wrote:
>>>> Hello everyone,
>>>>
>>>> I've an aa.git tree uptodate on the master & userfault branch (master
>>>> includes other pending VM stuff, userfault branch only contains
>>>> userfault enhancements):
>>>>
>>>> https://git.kernel.org/cgit/linux/kernel/git/andrea/aa.git/log/?h=userfault
>>>>
>>>>
>>>>
>>>> I didn't have time to test KVM live memory snapshot on it yet as I'm
>>>> still working to improve it. Did anybody test it? However I'd be happy
>>>> to take any bugreports and quickly solve anything that isn't working
>>>> right with the shadow MMU.
>>>>
>>>> I got positive report already for another usage of the uffd WP
>>>> support:
>>>>
>>>> https://medium.com/@MartinCracauer/generational-garbage-collection-write-barriers-write-protection-and-userfaultfd-2-8b0e796b8f7f
>>>>
>>>>
>>>>
>>>> The last few things I'm working on to finish the WP support are:
>>>>
>>>> 1) pte_swp_mkuffd_wp equivalent of pte_swp_mksoft_dirty to mark in a
>>>> vma->vm_flags with VM_UFFD_WP set, which swap entries were
>>>> generated while the pte was wrprotected.
>>>>
>>>> 2) to avoid all false positives the equivalent of pte_mksoft_dirty is
>>>> needed too... and that requires spare software bits on the pte
>>>> which are available on x86. I considered also taking over the
>>>> soft_dirty bit but then you couldn't do checkpoint restore of a
>>>> JIT/to-native compiler that uses uffd WP support so it wasn't
>>>> ideal. Perhaps it would be ok as an incremental patch to make the
>>>> two options mutually exclusive to defer the arch changes that
>>>> pte_mkuffd_wp would require for later.
>>>>
>>>> 3) prevent UFFDIO_ZEROPAGE if registering WP|MISSING or trigger a
>>>> cow in userfaultfd_writeprotect.
>>>>
>>>> 4) WP selftest
>>>>
>>>> In theory things should work ok already if the userland code is
>>>> tolerant against false positives through swap and after fork() and
>>>> KSM. For an usage like snapshotting false positives shouldn't be an
>>>> issue (it'll just run slower if you swap in the worst case), and point
>>>> 3) above also isn't an issue because it's going to register into uffd
>>>> with WP only.
>>>>
>>>> The current status includes:
>>>>
>>>> 1) WP support for anon (with false positives.. work in progress)
>>>>
>>>> 2) MISSING support for tmpfs and hugetlbfs
>>>>
>>>> 3) non cooperative support
>>>>
>>>> Thanks,
>>>> Andrea
>>>>
>>>> .
>>>>
>>>
>>
>>
>> .
>>
>
next prev parent reply other threads:[~2017-02-28 8:30 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-07 12:19 [Qemu-devel] [RFC 00/13] Live memory snapshot based on userfaultfd zhanghailiang
2016-01-07 12:19 ` [Qemu-devel] [RFC 01/13] postcopy/migration: Split fault related state into struct UserfaultState zhanghailiang
2016-01-07 12:19 ` [Qemu-devel] [RFC 02/13] migration: Allow the migrate command to work on file: urls zhanghailiang
2016-07-13 16:12 ` Dr. David Alan Gilbert
2016-07-14 5:27 ` Hailiang Zhang
2016-01-07 12:19 ` [Qemu-devel] [RFC 03/13] migration: Allow -incoming " zhanghailiang
2016-01-11 20:02 ` Dr. David Alan Gilbert
2016-01-12 13:04 ` Hailiang Zhang
2016-01-07 12:19 ` [Qemu-devel] [RFC 04/13] migration: Create a snapshot thread to realize saving memory snapshot zhanghailiang
2016-01-07 12:20 ` [Qemu-devel] [RFC 05/13] migration: implement initialization work for snapshot zhanghailiang
2016-01-07 12:20 ` [Qemu-devel] [RFC 06/13] QEMUSizedBuffer: Introduce two help functions for qsb zhanghailiang
2016-01-07 12:20 ` [Qemu-devel] [RFC 07/13] savevm: Split qemu_savevm_state_complete_precopy() into two helper functions zhanghailiang
2016-01-07 12:20 ` [Qemu-devel] [RFC 08/13] snapshot: Save VM's device state into snapshot file zhanghailiang
2016-01-07 12:20 ` [Qemu-devel] [RFC 09/13] migration/postcopy-ram: fix some helper functions to support userfaultfd write-protect zhanghailiang
2016-01-07 12:20 ` [Qemu-devel] [RFC 10/13] snapshot: Enable the write-protect notification capability for VM's RAM zhanghailiang
2016-01-07 12:20 ` [Qemu-devel] [RFC 11/13] snapshot/migration: Save VM's RAM into snapshot file zhanghailiang
2016-01-07 12:20 ` [Qemu-devel] [RFC 12/13] migration/ram: Fix some helper functions' parameter to use PageSearchStatus zhanghailiang
2016-01-11 17:55 ` Dr. David Alan Gilbert
2016-01-12 12:59 ` Hailiang Zhang
2016-01-07 12:20 ` [Qemu-devel] [RFC 13/13] snapshot: Remove page's write-protect and copy the content during setup stage zhanghailiang
2016-07-13 17:52 ` Dr. David Alan Gilbert
2016-07-14 8:02 ` Hailiang Zhang
2016-07-04 12:22 ` [Qemu-devel] [RFC 00/13] Live memory snapshot based on userfaultfd Baptiste Reynal
2016-07-05 1:49 ` Hailiang Zhang
2016-07-05 9:57 ` Baptiste Reynal
2016-07-05 10:27 ` Hailiang Zhang
2016-08-18 15:56 ` Andrea Arcangeli
2016-08-20 6:31 ` Hailiang Zhang
2017-02-27 15:37 ` Christian Pinto
2017-02-28 1:48 ` Hailiang Zhang
2017-02-28 8:30 ` Christian Pinto [this message]
2017-02-28 16:14 ` Andrea Arcangeli
2017-03-01 1:08 ` Hailiang Zhang
2017-03-09 11:34 ` [Qemu-devel] [RFC PATCH 0/4] ARM/ARM64 fixes for live " Christian Pinto
2017-03-09 11:34 ` [Qemu-devel] [RFC PATCH 1/4] migration/postcopy-ram: check pagefault flags in userfaultfd thread Christian Pinto
2017-03-09 11:34 ` [Qemu-devel] [RFC PATCH 2/4] migration/ram: Fix for ARM/ARM64 page size Christian Pinto
2017-03-09 11:34 ` [Qemu-devel] [RFC PATCH 3/4] migration: snapshot thread Christian Pinto
2017-03-09 11:34 ` [Qemu-devel] [RFC PATCH 4/4] migration/postcopy-ram: ram_set_pages_wp fix Christian Pinto
2017-03-09 17:46 ` [Qemu-devel] [RFC PATCH 0/4] ARM/ARM64 fixes for live memory snapshot based on userfaultfd Dr. David Alan Gilbert
2017-03-10 8:15 ` Christian Pinto
2016-09-06 3:39 ` [Qemu-devel] [RFC 00/13] Live " Hailiang Zhang
2016-09-18 2:14 ` Hailiang Zhang
2016-12-08 12:45 ` Hailiang Zhang
2016-07-05 14:59 ` Andrea Arcangeli
2016-07-13 18:02 ` Dr. David Alan Gilbert
2016-07-14 10:24 ` Hailiang Zhang
2016-07-14 11:43 ` Dr. David Alan Gilbert
2016-07-19 6:53 ` Hailiang Zhang
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=3d86610f-a7e6-e0ff-a641-9168b9ef5437@virtualopensystems.com \
--to=c.pinto@virtualopensystems.com \
--cc=aarcange@redhat.com \
--cc=b.reynal@virtualopensystems.com \
--cc=colo-ft@hotmail.com \
--cc=dgilbert@redhat.com \
--cc=peter.huangpeng@huawei.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
--cc=weidong.huang@huawei.com \
--cc=xuquan8@huawei.com \
--cc=zhang.zhanghailiang@huawei.com \
/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.