On Thu, Feb 13, 2020 at 10:17:04AM +, Dr. David Alan Gilbert wrote:
>* Wei Yang (richardw.y...@linux.intel.com) wrote:
>> ram_discard_range() unmap page for specific range. To be specific, this
>> clears related page table entries so that userfault would be triggered.
&
Hi, David and Juan
Does it look good to you?
On Mon, Oct 07, 2019 at 05:10:08PM +0800, Wei Yang wrote:
>ram_discard_range() unmap page for specific range. To be specific, this
>clears related page table entries so that userfault would be triggered.
>But this step is not necessary at
Oops, this one seems to be missed.
On Mon, Oct 07, 2019 at 05:10:08PM +0800, Wei Yang wrote:
>ram_discard_range() unmap page for specific range. To be specific, this
>clears related page table entries so that userfault would be triggered.
>But this step is not necessary at the very
On Thu, Jan 09, 2020 at 10:50:25AM +0100, Juan Quintela wrote:
>Wei Yang wrote:
>> On Mon, Dec 16, 2019 at 10:35:39AM +0800, Wei Yang wrote:
>>>Would this one be picked up this time?
>>
>> Happy new year to all.
>>
>> Can I ask the plan for this patch
On Wed, Dec 18, 2019 at 07:55:38PM +, Dr. David Alan Gilbert wrote:
>* Wei Yang (richardw.y...@linux.intel.com) wrote:
>> Would this one be picked up in this version?
>
>I think that one is on Juan's list for the pull he's going to do soon.
>
>Dave
>
Happy New Year to
On Mon, Dec 16, 2019 at 10:35:39AM +0800, Wei Yang wrote:
>Would this one be picked up this time?
Happy new year to all.
Can I ask the plan for this patch set?
>
>On Sat, Oct 26, 2019 at 07:19:58AM +0800, Wei Yang wrote:
>>We don't support multifd during postcopy, but user sti
Ping for comment.
On Sat, Oct 26, 2019 at 08:45:14AM +0800, Wei Yang wrote:
>Current send thread could work while the sync mechanism has some problem:
>
> * has spuriously wakeup
> * number of channels_ready will *overflow* the number of real channels
&
Would this one be picked up this time?
On Sat, Oct 26, 2019 at 07:19:58AM +0800, Wei Yang wrote:
>We don't support multifd during postcopy, but user still could enable
>both multifd and postcopy. This leads to migration failure.
>
>Patch 1 does proper cleanup, otherwise we m
Would this one be picked up in this version?
On Thu, Nov 07, 2019 at 08:39:01PM +0800, Wei Yang wrote:
>This patch set tries enable compress during postcopy.
>
>postcopy requires to place a whole host page, while migration thread migrate
>memory in target page size. This makes p
On Tue, Nov 19, 2019 at 11:57:22AM +0100, Juan Quintela wrote:
>Wei Yang wrote:
>> Fill data and update/cleanup related field in one place. Also make the
>> code a little clean.
>>
>> Signed-off-by: Wei Yang
>
>Reviewed-by: Juan Quintela
>
>right cleanup.
On Tue, Nov 19, 2019 at 11:55:52AM +0100, Juan Quintela wrote:
>Wei Yang wrote:
>> We don't support multifd during postcopy, but user still could enable
>> both multifd and postcopy. This leads to migration failure.
>>
>> Skip multifd during postcopy.
>>
>&g
Ping for comments.
On Sat, Oct 26, 2019 at 07:19:58AM +0800, Wei Yang wrote:
>We don't support multifd during postcopy, but user still could enable
>both multifd and postcopy. This leads to migration failure.
>
>Patch 1 does proper cleanup, otherwise we may have data corruption.
&
On Mon, Nov 11, 2019 at 10:25:43AM +, Alex Benn??e wrote:
>
>Wei Yang writes:
>
>> This file uses quite a different code style and changing just one line
>> would leads to some awkward appearance.
>>
>> This is a preparation for the following replacement of
&g
t; is better :-)
>On Tue, Oct 15, 2019 at 11:13:50AM +0800, Wei Yang wrote:
>> Signed-off-by: Wei Yang
>> Suggested-by: "Dr. David Alan Gilbert"
>> CC: Richard Henderson
>> ---
>> block/file-posix.c | 2 +-
>> net/l2tpv3.c
On Tue, Oct 15, 2019 at 11:13:48AM +0800, Wei Yang wrote:
>This is a following up patch to cleanup page size, suggested by
>"Dr. David Alan Gilbert" .
>
>Patch 2 does the job, while during the cleanup I found test-mmap.c has quite a
>lot code style problem. To make the
On Thu, Nov 07, 2019 at 02:30:25PM +, Dr. David Alan Gilbert wrote:
>* Wei Yang (richardw.y...@linux.intel.com) wrote:
>> After using number of target page received to track one host page, we
>> could have the capability to handle random order target page arrival in
&
thread for before placing host page
Signed-off-by: Wei Yang
Reviewed-by: Dr. David Alan Gilbert
---
migration/migration.c | 11 ---
migration/ram.c | 28 +++-
2 files changed, 27 insertions(+), 12 deletions(-)
diff --git a/migration/migration.c b/migration
After using number of target page received to track one host page, we
could have the capability to handle random order target page arrival in
one host page.
This is a preparation for enabling compress during postcopy.
Signed-off-by: Wei Yang
---
v2:
* use uintptr_t to calculate place_dest
Compress is not supported with postcopy, it is safe to wait for
decompress thread just in precopy.
This is a preparation for later patch.
Signed-off-by: Wei Yang
Reviewed-by: Dr. David Alan Gilbert
---
migration/ram.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git
For the first target page, all_zero is set to true for this round check.
After target_pages introduced, we could leverage this variable instead
of checking the address offset.
Signed-off-by: Wei Yang
Reviewed-by: Dr. David Alan Gilbert
---
migration/ram.c | 2 +-
1 file changed, 1 insertion
In this case, page_buffer content would not be used.
Skip this to save some time.
Signed-off-by: Wei Yang
Reviewed-by: Dr. David Alan Gilbert
---
migration/ram.c | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/migration/ram.c b/migration/ram.c
index 99a98b2da4
pages belongs to the same host page
Wei Yang (6):
migration/postcopy: reduce memset when it is zero page and
matches_target_page_size
migration/postcopy: wait for decompress thread in precopy
migration/postcopy: count target page number to decide the
place_needed
migration/postcopy
), this means it is the last target
page in the host page.
This is a preparation for non-ordered target page transmission.
Signed-off-by: Wei Yang
Reviewed-by: Dr. David Alan Gilbert
---
migration/ram.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/migration/ram.c
On Thu, Nov 07, 2019 at 11:59:10AM +, Dr. David Alan Gilbert wrote:
>* Wei Yang (richardw.y...@linux.intel.com) wrote:
>> We open a file with empty_ops for compress QEMUFile, which means this is
>> not writable.
>
>That explanation sounds reasonable; but I'm co
On Thu, Nov 07, 2019 at 09:15:44AM +, Dr. David Alan Gilbert wrote:
>* Wei Yang (richardw.y...@linux.intel.com) wrote:
>> On Wed, Nov 06, 2019 at 08:11:44PM +, Dr. David Alan Gilbert wrote:
>> >* Wei Yang (richardw.y...@linux.intel.com) wrote:
>> >> This p
On Wed, Nov 06, 2019 at 08:11:44PM +, Dr. David Alan Gilbert wrote:
>* Wei Yang (richardw.y...@linux.intel.com) wrote:
>> This patch set tries enable compress during postcopy.
>>
>> postcopy requires to place a whole host page, while migration thread migrate
>>
On Wed, Nov 06, 2019 at 08:08:28PM +, Dr. David Alan Gilbert wrote:
>* Wei Yang (richardw.y...@linux.intel.com) wrote:
>> After using number of target page received to track one host page, we
>> could have the capability to handle random order target page arrival in
&
If hyperv is not enabled, related features are not set or enabled.
No extra work to do, return directly.
---
First time touch hyperv, hope my understanding is correct.
Signed-off-by: Wei Yang
---
target/i386/kvm.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/target/i386/kvm.c b
On Tue, Oct 29, 2019 at 07:04:19AM +, Dr. David Alan Gilbert wrote:
>* Wei Yang (richardw.y...@linux.intel.com) wrote:
>> On Fri, Jul 19, 2019 at 07:06:51PM +0100, Dr. David Alan Gilbert wrote:
>> >* Paolo Bonzini (pbonz...@redhat.com) wrote:
>> >> On 19/07/19
aligned start address: %p",
>> host_startaddr);
>> goto err;
>> }
>>
>> just before this context.
>>
>> Paolo
>--
>Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK
--
Wei Yang
Help you, Help me
After thread synchronization request is handled in another case, this
means when we only get pending_job when there is used pages.
Signed-off-by: Wei Yang
---
migration/ram.c | 11 +--
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/migration/ram.c b/migration/ram.c
index
Fill data and update/cleanup related field in one place. Also make the
code a little clean.
Signed-off-by: Wei Yang
---
migration/ram.c | 20 +++-
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/migration/ram.c b/migration/ram.c
index 5876054195..35f147388b 100644
.
---
v2: rebase on latest code
Wei Yang (6):
migration/multifd: move Params update and pages cleanup into
multifd_send_fill_packet()
migration/multifd: notify channels_ready when send thread starts
migration/multifd: use sync field to synchronize send threads
migration/multifd: used must
The spurious wakeup is gone.
Signed-off-by: Wei Yang
---
migration/ram.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/migration/ram.c b/migration/ram.c
index fccdbfabc5..73ace40b1b 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -1168,8 +1168,8 @@ static void
After synchronization request is handled in another case, there only
could be one pending_job for one send thread at most.
This is fine to use boolean to represent this behavior.
Signed-off-by: Wei Yang
---
migration/ram.c | 9 -
1 file changed, 4 insertions(+), 5 deletions(-)
diff
uce some unpredictable
situation and disturb the semaphore value.
This is a preparation patch to use another mechanism to do send thread
synchronization to avoid post channels_ready in this case. So this patch
posts channels_ready when send threads start running.
Signed-off-by: Wei Y
Add a field in MultiFDSendParams to indicate there is a request to
synchronize send threads.
By doing so, send_thread will just post sem_sync on synchronization
request and channels_ready will not *overflow*.
Signed-off-by: Wei Yang
---
migration/ram.c | 30 --
1
will
continue to be transferred.
After clean pages, migration succeeds.
Signed-off-by: Wei Yang
---
migration/ram.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/migration/ram.c b/migration/ram.c
index 80dd2d55f9..7087bb73ed 100644
--- a/migration/ram.c
+++ b/migration/ram.c
another
patch set.
Wei Yang (2):
migration/multifd: clean pages after filling packet
migration/multifd: not use multifd during postcopy
migration/ram.c | 15 ++-
1 file changed, 10 insertions(+), 5 deletions(-)
--
2.17.1
We don't support multifd during postcopy, but user still could enable
both multifd and postcopy. This leads to migration failure.
Skip multifd during postcopy.
Signed-off-by: Wei Yang
---
migration/ram.c | 9 ++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/migration
rectory `/var/tmp/patchew-tester-tmp-dh8p6f27/src'
>make: *** [docker-run-test-mingw@fedora] Error 2
>
>real2m45.691s
>user0m8.390s
>
>
>The full log is available at
>http://patchew.org/logs/20191018004850.9888-1-richardw.y...@linux.intel.com/testing.docker-mingw@fedora/?type=message.
>---
>Email generated automatically by Patchew [https://patchew.org/].
>Please send your feedback to patchew-de...@redhat.com
--
Wei Yang
Help you, Help me
After using number of target page received to track one host page, we
could have the capability to handle random order target page arrival in
one host page.
This is a preparation for enabling compress during postcopy.
Signed-off-by: Wei Yang
---
migration/ram.c | 16 +++-
1 file
thread for before placing host page
Signed-off-by: Wei Yang
---
migration/migration.c | 11 ---
migration/ram.c | 28 +++-
2 files changed, 27 insertions(+), 12 deletions(-)
diff --git a/migration/migration.c b/migration/migration.c
index 3febd0f8f3
), this means it is the last target
page in the host page.
This is a preparation for non-ordered target page transmission.
Signed-off-by: Wei Yang
---
migration/ram.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/migration/ram.c b/migration/ram.c
index f59e3fe197
.
The second one is handled by:
1. Flush compress thread for each host page
2. Wait for decompress thread for before placing host page
With the combination of these two changes, compress is enabled during
postcopy.
Wei Yang (6):
migration/postcopy: reduce memset when it is zero page
In this case, page_buffer content would not be used.
Skip this to save some time.
Signed-off-by: Wei Yang
---
migration/ram.c | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/migration/ram.c b/migration/ram.c
index 99a98b2da4..7938a643d9 100644
--- a/migration/ram.c
Compress is not supported with postcopy, it is safe to wait for
decompress thread just in precopy.
This is a preparation for later patch.
Signed-off-by: Wei Yang
---
migration/ram.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/migration/ram.c b/migration/ram.c
index
For the first target page, all_zero is set to true for this round check.
After target_pages introduced, we could leverage this variable instead
of checking the address offset.
Signed-off-by: Wei Yang
---
migration/ram.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
Signed-off-by: Wei Yang
CC: Richard Henderson
CC: Stefan Hajnoczi
---
v2: add "\b" for better match, suggested by Richard Henderson
---
scripts/checkpatch.pl | 6 ++
1 file changed, 6 insertions(+)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index aa9a354a0e..
On Wed, Oct 16, 2019 at 07:48:50PM +0100, Stefan Hajnoczi wrote:
>On Wed, Oct 16, 2019 at 09:24:32AM +0800, Wei Yang wrote:
>> Signed-off-by: Wei Yang
>> CC: David Gibson
>> ---
>> scripts/checkpatch.pl | 6 ++
>> 1 file changed, 6 insertions(+)
>>
On Wed, Oct 16, 2019 at 08:43:32AM -0700, Richard Henderson wrote:
>On 10/15/19 6:24 PM, Wei Yang wrote:
>> if ($line =~ /\bbzero\(/) {
>> ERROR("use memset() instead of bzero()\n" . $herecurr);
>> }
>> +
real_host_page_size instead of
>getpagesize()\n" . $herecurr);
>
Since this is an error message and I see other similar code keep it in the
same line, I didn't split it into two lines.
If necessary, I would split it.
--
Wei Yang
Help you, Help me
On Sun, Oct 13, 2019 at 08:28:41PM +1100, David Gibson wrote:
>On Sun, Oct 13, 2019 at 10:11:45AM +0800, Wei Yang wrote:
>> There are three page size in qemu:
>>
>> real host page size
>> host page size
>> target page size
>>
>> All of them have
Signed-off-by: Wei Yang
CC: David Gibson
---
scripts/checkpatch.pl | 6 ++
1 file changed, 6 insertions(+)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index aa9a354a0e..4b360ed310 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2915,6 +2915,12 @@ sub
On Tue, Oct 15, 2019 at 02:45:15PM +0300, Yuval Shaia wrote:
>On Sun, Oct 13, 2019 at 10:11:45AM +0800, Wei Yang wrote:
>> There are three page size in qemu:
>>
>> real host page size
>> host page size
>> target page size
>>
>> All of them have
-off-by: Wei Yang
---
tests/tcg/multiarch/test-mmap.c | 67 ++---
1 file changed, 36 insertions(+), 31 deletions(-)
diff --git a/tests/tcg/multiarch/test-mmap.c b/tests/tcg/multiarch/test-mmap.c
index 11d0e777b1..9ea49e2307 100644
--- a/tests/tcg/multiarch/test-mmap.c
Signed-off-by: Wei Yang
Suggested-by: "Dr. David Alan Gilbert"
CC: Richard Henderson
---
block/file-posix.c | 2 +-
net/l2tpv3.c| 2 +-
tests/tcg/multiarch/test-mmap.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/block/file
This is a following up patch to cleanup page size, suggested by
"Dr. David Alan Gilbert" .
Patch 2 does the job, while during the cleanup I found test-mmap.c has quite a
lot code style problem. To make the code looks good, patch 1 is introduced to
make checkpatch.pl happy a little.
W
On Mon, Oct 14, 2019 at 12:05:47PM -0300, Eduardo Habkost wrote:
>On Sat, Oct 12, 2019 at 05:02:09PM +0800, Wei Yang wrote:
>> On Sat, Sep 14, 2019 at 03:40:41PM -0400, Michael S. Tsirkin wrote:
>> >On Fri, Sep 13, 2019 at 11:47:46PM +, Wei Yang wrote:
>> >> On T
2bed5d
Author: bellard
Date: Tue May 13 00:25:15 2003 +
mmap emulation
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@158
c046a42c-6fe2-441c-8c8c-71466251a162
There is no reason logged.
On Sun, Oct 13, 2019 at 10:11:43AM +0800, Wei Yang wrote:
&g
On Mon, Oct 14, 2019 at 10:15:02AM +0100, Dr. David Alan Gilbert wrote:
>* Wei Yang (richardw.y...@linux.intel.com) wrote:
>> There are three page size in qemu:
>>
>> real host page size
>> host page size
>> target page size
>>
>> Al
On Sun, Oct 13, 2019 at 07:38:04PM -0700, Richard Henderson wrote:
>On 10/13/19 6:01 PM, Wei Yang wrote:
>>> No, please.
>>>
>>> (1) The compiler does not know that qemu_*host_page_size is a power of 2,
>>> and
>>> will genera
On Sun, Oct 13, 2019 at 11:56:35AM -0400, Richard Henderson wrote:
>On 10/12/19 10:11 PM, Wei Yang wrote:
>> Use ROUND_UP() to define, which is a little bit easy to read.
>>
>> Signed-off-by: Wei Yang
>> ---
>> include/exec/cpu-all.h | 7 +++
>> 1 fil
Use ROUND_UP() to define, which is a little bit easy to read.
Signed-off-by: Wei Yang
---
include/exec/cpu-all.h | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h
index ad9ab85eb3..255bb186ac 100644
--- a/include/exec/cpu
().
qemu_real_host_page_size is defined to be a replacement of
getpagesize(), so let it serve the role.
[Note] Not fully tested for some arch or device.
Signed-off-by: Wei Yang
---
accel/kvm/kvm-all.c| 6 +++---
backends/hostmem.c | 2 +-
block.c| 4
Patch 1 simplify the definition of xxx_PAGE_ALIGN.
Patch 2 replaces getpagesize() with qemu_real_host_page_size. This one touch a
volume of code. If some point is not correct, I'd appreciate your
notification.
Wei Yang (2):
cpu: use ROUND_UP() to define xxx_PAGE_ALIGN
core: replace
On Sat, Sep 14, 2019 at 03:40:41PM -0400, Michael S. Tsirkin wrote:
>On Fri, Sep 13, 2019 at 11:47:46PM +0000, Wei Yang wrote:
>> On Tue, Jul 30, 2019 at 08:37:38AM +0800, Wei Yang wrote:
>> >When we iterate the memory-device list to get the available range, it is not
>&g
In current logic, if compress_threads_save_setup() returns -1 the whole
migration would fail, while we could handle it gracefully by disable
compress.
Signed-off-by: Wei Yang
---
migration/migration.c | 9 +
migration/migration.h | 1 +
migration/ram.c | 15 ---
3
Two patches related to compress:
1. simplify the check since compress QEMUFile is not writable
2. handle compress setup failure gracefully
Wei Yang (2):
migration/compress: compress QEMUFile is not writable
migration/compress: disable compress if failed to setup
migration/migration.c | 9
We open a file with empty_ops for compress QEMUFile, which means this is
not writable.
Signed-off-by: Wei Yang
---
migration/qemu-file.c | 16 +++-
1 file changed, 3 insertions(+), 13 deletions(-)
diff --git a/migration/qemu-file.c b/migration/qemu-file.c
index 26fb25ddc1
On Fri, Oct 11, 2019 at 12:20:48PM +0200, Juan Quintela wrote:
>Wei Yang wrote:
>> MultiFDPacket_t's magic and version field never changes during
>> migration, so move these two fields in setup stage.
>>
>> Signed-off-by: Wei Yang
>
>Reviewed-by: Juan Qu
On Fri, Oct 11, 2019 at 12:40:03PM +0200, Juan Quintela wrote:
>Wei Yang wrote:
>> On Wed, Sep 04, 2019 at 08:29:15AM +0200, Juan Quintela wrote:
>>>Reviewed-by: Daniel P. Berrang??
>>>Signed-off-by: Juan Quintela
>>>---
>>> migration/socket.c | 7 +
multifd_send_fill_packet() prepares meta data for following pages to
transfer. It would be more proper to fill pages->allocated instead of
static max value, especially we want to support flexible packet size.
Signed-off-by: Wei Yang
---
migration/ram.c | 3 +--
1 file changed, 1 insertion(+)
Here are four trivial cleanups related to multifd.
Fix a typo, use a proper variable and setup never changed variables only once.
Wei Yang (4):
migration/multifd: fix a typo in comment of
multifd_recv_unfill_packet()
migration/multifd: use pages->allocated instead of the static
When we found an available channel in multifd_send_pages(), its
pages->used is cleared and then attached to multifd_send_state.
It is not necessary to do this twice.
Signed-off-by: Wei Yang
---
migration/ram.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/migration/ram.c b/migration/ra
Signed-off-by: Wei Yang
---
migration/ram.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/migration/ram.c b/migration/ram.c
index 22423f08cd..cf30171f44 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -838,7 +838,7 @@ static int multifd_recv_unfill_packet
MultiFDPacket_t's magic and version field never changes during
migration, so move these two fields in setup stage.
Signed-off-by: Wei Yang
---
migration/ram.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/migration/ram.c b/migration/ram.c
index 6a3bef0434..71d845b851
ener_open_sync(listener, saddr, num, errp) < 0) {
> object_unref(OBJECT(listener));
> return;
> }
My confusion is this function is called at the beginning of the program, which
means we didn't set multifd on or change the multifd channel parameter.
They are the default value at this point.
Am I right?
>--
>2.21.0
>
--
Wei Yang
Help you, Help me
On Wed, Oct 09, 2019 at 11:17:16AM +0100, Dr. David Alan Gilbert wrote:
>* Wei Yang (richardw.y...@linux.intel.com) wrote:
>> On Tue, Oct 08, 2019 at 08:15:51PM +0100, Dr. David Alan Gilbert wrote:
>> >* Wei Yang (richardw.y...@linux.intel.com) wrote:
>> >> After pre
Function postcopy_ram_incoming_setup and postcopy_ram_incoming_cleanup
is a pair. Rename to make it clear for audience.
Signed-off-by: Wei Yang
Reviewed-by: Dr. David Alan Gilbert
---
migration/postcopy-ram.c | 4 ++--
migration/postcopy-ram.h | 2 +-
migration/savevm.c | 2 +-
3 files
ve yet.
This patch makes sure state is set to RUNNING only previous state is
LISTENING by checking the state first.
Signed-off-by: Wei Yang
Suggested by: Peter Xu
---
migration/savevm.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/migration/savevm.c b/migration/savevm.c
index 78c2
Refine a function name and handle on corner case related to PostcopyState.
v2:
* remove one unnecessary patch
* simplify corner case handling
Wei Yang (2):
migration/postcopy: rename postcopy_ram_enable_notify to
postcopy_ram_incoming_setup
migration/postcopy: check PostcopyState
oops
>> >return -1;
>> > postcopy_state_set(RUNNING);
>> >
>>
>> Looks good to me.
>>
>> Dave,
>>
>> Do you feel good with it?
>
>Yes, I think so; it's simpler.
>
I will prepare v2.
>Dave
>
>> >Thanks,
>> >
>> >--
>> >Peter Xu
>>
>> --
>> Wei Yang
>> Help you, Help me
>--
>Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK
--
Wei Yang
Help you, Help me
On Wed, Oct 09, 2019 at 01:36:34PM +0800, Peter Xu wrote:
>On Wed, Oct 09, 2019 at 01:07:56PM +0800, Wei Yang wrote:
>> On Wed, Oct 09, 2019 at 12:12:25PM +0800, Peter Xu wrote:
>> >On Wed, Oct 09, 2019 at 09:02:04AM +0800, Wei Yang wrote:
>> >> On Tue, Oct 08, 2019
On Wed, Oct 09, 2019 at 12:12:25PM +0800, Peter Xu wrote:
>On Wed, Oct 09, 2019 at 09:02:04AM +0800, Wei Yang wrote:
>> On Tue, Oct 08, 2019 at 05:40:46PM +0100, Dr. David Alan Gilbert wrote:
>> >* Wei Yang (richardw.y...@linux.intel.com) wrote:
>> >> Currently
On Tue, Oct 08, 2019 at 08:15:51PM +0100, Dr. David Alan Gilbert wrote:
>* Wei Yang (richardw.y...@linux.intel.com) wrote:
>> After previous cleanup, postcopy thread is running only when
>> PostcopyState is LISTENNING or RUNNING. This means it is not necessary
>>
On Tue, Oct 08, 2019 at 06:38:25PM +0100, Dr. David Alan Gilbert wrote:
>* Wei Yang (richardw.y...@linux.intel.com) wrote:
>> The only possible bit set in invalid_flags is
>> RAM_SAVE_FLAG_COMPRESS_PAGE at the beginning of function
>> ram_load_precopy(), which means it i
On Tue, Oct 08, 2019 at 06:24:23PM +0100, Dr. David Alan Gilbert wrote:
>* Wei Yang (richardw.y...@linux.intel.com) wrote:
>> postcopy_ram_incoming_setup() and postcopy_ram_incoming_cleanup() are
>> counterpart. It is reasonable to map/unmap large zero page in these two
>> f
On Tue, Oct 08, 2019 at 05:40:46PM +0100, Dr. David Alan Gilbert wrote:
>* Wei Yang (richardw.y...@linux.intel.com) wrote:
>> Currently, we set PostcopyState blindly to RUNNING, even we found the
>> previous state is not LISTENING. This will lead to a corner case.
>>
On Tue, Oct 08, 2019 at 05:02:02PM +0100, Dr. David Alan Gilbert wrote:
>* Wei Yang (richardw.y...@linux.intel.com) wrote:
>> postcopy_ram_incoming_cleanup() does cleanup for
>> postcopy_ram_incoming_setup(), while the setup happens only after
>> migration enters LISTEN sta
when migration thread just starts, which
implies destination is not running yet. This means no page fault
happened and memory region's page tables entries are empty.
This patch removes the discard at the beginning.
Signed-off-by: Wei Yang
---
migration/postcopy-ram.c | 46
to indicate the
listen thread is done.
This is a preparation patch for later cleanup.
Signed-off-by: Wei Yang
---
migration/postcopy-ram.c | 2 --
migration/savevm.c | 2 ++
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/migration/postcopy-ram.c b/migration/postcopy-ram.c
index
-by: Wei Yang
---
migration/migration.h | 1 -
migration/ram.c | 2 +-
migration/ram.h | 1 +
migration/savevm.c| 4 +---
4 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/migration/migration.h b/migration/migration.h
index 4f2fe193dc..a4d639663d 100644
--- a/migration
ned-off-by: Wei Yang
---
migration/savevm.c | 5 -
1 file changed, 5 deletions(-)
diff --git a/migration/savevm.c b/migration/savevm.c
index feb757de79..eaa4cf58ef 100644
--- a/migration/savevm.c
+++ b/migration/savevm.c
@@ -1878,11 +1878,6 @@ static int
loadvm_postcopy_handle_lis
cleanup is included.
Wei Yang (3):
migration/postcopy: mis->have_listen_thread check will never be
touched
migration/postcopy: postpone setting PostcopyState to END
migration/postcopy: replace have_listen_thread check with
PostcopyState check
migration/migration.h|
This patch set contains several cleanup and refine for migration.
simplify some calculation
reuse the result
fix typo in comment
provide error message when failed
Wei Yang (4):
migration/ram: only possible bit set in invalid_flags is
RAM_SAVE_FLAG_COMPRESS_PAGE
migration
This provides helpful information on which entry failed.
Signed-off-by: Wei Yang
---
migration/savevm.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/migration/savevm.c b/migration/savevm.c
index 9f0122583d..feb757de79 100644
--- a/migration/savevm.c
+++ b/migration/savevm.c
@@ -1215,6
Not necessary to do the check again.
Signed-off-by: Wei Yang
---
migration/migration.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/migration/migration.c b/migration/migration.c
index c8eaa85867..56031305e3 100644
--- a/migration/migration.c
+++ b/migration/migration.c
Signed-off-by: Wei Yang
---
migration/postcopy-ram.c | 8 +---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/migration/postcopy-ram.c b/migration/postcopy-ram.c
index d2bdd21ae3..a394c7c3a6 100644
--- a/migration/postcopy-ram.c
+++ b/migration/postcopy-ram.c
@@ -768,9 +768,11
The only possible bit set in invalid_flags is
RAM_SAVE_FLAG_COMPRESS_PAGE at the beginning of function
ram_load_precopy(), which means it is not necessary to do
another check for RAM_SAVE_FLAG_COMPRESS_PAGE bit.
Signed-off-by: Wei Yang
---
migration/ram.c | 5 +
1 file changed, 1 insertion
1 - 100 of 739 matches
Mail list logo