From mboxrd@z Thu Jan 1 00:00:00 1970
Received: from eggs.gnu.org ([2001:4830:134:3::10]:43087)
by lists.gnu.org with esmtp (Exim 4.71)
(envelope-from
) id 1ZrnO3-0007Fi-Qp
for qemu-devel@nongnu.org; Thu, 29 Oct 2015 09:37:07 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
(envelope-from ) id 1ZrnNx-000352-QM
for qemu-devel@nongnu.org; Thu, 29 Oct 2015 09:37:03 -0400
Received: from mailout3.w1.samsung.com ([210.118.77.13]:37677)
by eggs.gnu.org with esmtp (Exim 4.71)
(envelope-from ) id 1ZrnNx-00034i-KU
for qemu-devel@nongnu.org; Thu, 29 Oct 2015 09:36:57 -0400
Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244])
by mailout3.w1.samsung.com
(Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5
2014)) with ESMTP id <0NWZ00H5AHTGH700@mailout3.w1.samsung.com> for
qemu-devel@nongnu.org; Thu, 29 Oct 2015 13:36:52 +0000 (GMT)
From: Pavel Fedin
References: <012c01d110a6$cd61cf90$68256eb0$@samsung.com>
<87k2q8e8d4.fsf@neno.neno>
<002b01d110c0$4a5c8e40$df15aac0$@samsung.com>
<877fm7b9h2.fsf@neno.neno>
<007101d11174$ef2b83e0$cd828ba0$@samsung.com>
<871tcdq31p.fsf@neno.neno>
In-reply-to: <871tcdq31p.fsf@neno.neno>
Date: Thu, 29 Oct 2015 16:36:51 +0300
Message-id: <005a01d1124e$de9dd610$9bd98230$@samsung.com>
MIME-version: 1.0
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7bit
Content-language: ru
Subject: Re: [Qemu-devel]
[PATCH] migration: Introduce migration_in_completion()
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
To: quintela@redhat.com
Cc: 'Amit Shah' , 'Luiz Capitulino' , qemu-devel@nongnu.org, 'Michael Tsirkin'
Hello!
> ok, your problem here is that you modify ram. Could you take a look at
> how vhost manage this? It is done at migration_bitmap_sync(), and it
> just marks the pages that are dirty.
Hm, interesting... I see it hooks into memory_region_sync_dirty_bitmap(). Sorry for maybe lame question, i do not know the whole
code, and it will be much faster for you to explain it to me, than for me to dig into it myself. At what moment is it called during
migration?
For you to better understand what is necessary... ITS is a thing which can be implemented in-kernel by KVM, and i work on exactly
this. In my implementation i add an ioctl, which is called after CPUs are stopped. It flushes internal caches of the vITS to the
RAM. It happens inside the kernel. I guess, dirty state tracking works correctly in this case, because memory gets modified by the
kernel, and i guess from qemu's point of view it's the same as memory being modified by the guest. Therefore, i do not need to
modify memory state bitmaps. I only need to tell the kernel to actually write out the data.
If we talk about making this thing iterative, we anyway need this ioctl. It could be modified inside the kernel to update only
those RAM parts whose data have been modified since the last flush. The semantics would stay the same - it's just an ioctl telling
the virtual device to store its data in RAM.
Ah, and again, these memory listeners are not prioritized too. I guess i could use them, but i would need a guarantee that my
listener is called before KVMMemoryListener, which picks up changes.
Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia