qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 4d8851: migration: Don't use *_to_cpup() and


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 4d8851: migration: Don't use *_to_cpup() and cpu_to_*w()
Date: Fri, 17 Jun 2016 07:00:05 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 4d885131574ba530e48ef90d5c0ca4dffc9c3759
      
https://github.com/qemu/qemu/commit/4d885131574ba530e48ef90d5c0ca4dffc9c3759
  Author: Peter Maydell <address@hidden>
  Date:   2016-06-17 (Fri, 17 Jun 2016)

  Changed paths:
    M migration/migration.c
    M migration/savevm.c

  Log Message:
  -----------
  migration: Don't use *_to_cpup() and cpu_to_*w()

The *_to_cpup() and cpu_to_*w() functions just compose a pointer
dereference with a byteswap. Instead use ld*_p() and st*_p(),
which handle potential pointer misalignment and avoid the need
to cast the pointer.

Signed-off-by: Peter Maydell <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Amit Shah <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Amit Shah <address@hidden>


  Commit: 023ad1a6e9296470d8fd81db3bf0379057fc8994
      
https://github.com/qemu/qemu/commit/023ad1a6e9296470d8fd81db3bf0379057fc8994
  Author: Dr. David Alan Gilbert <address@hidden>
  Date:   2016-06-17 (Fri, 17 Jun 2016)

  Changed paths:
    M migration/vmstate.c
    M trace-events

  Log Message:
  -----------
  migration: Trace improvements

A couple of improvements to tracing that have come out of helping
people with migration problems:
  * vmstate_n_elems trace the count/name - for when you have problems
    getting array counts right
  * vmstate_subsection_load_bad - add the idstr, for when you receive a
    subsection you weren't expecting.

Signed-off-by: Dr. David Alan Gilbert <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Amit Shah <address@hidden>


  Commit: 6dcf66681aea2a371ddd63770bf80615652f5c94
      
https://github.com/qemu/qemu/commit/6dcf66681aea2a371ddd63770bf80615652f5c94
  Author: Denis V. Lunev <address@hidden>
  Date:   2016-06-17 (Fri, 17 Jun 2016)

  Changed paths:
    M migration/savevm.c

  Log Message:
  -----------
  migration: fix inability to save VM after snapshot

The following sequence of operations fails:
    virsh start vm
    virsh snapshot-create vm
    virshh save vm --file file
with the following error
    error: Failed to save domain vm to file
    error: internal error: unable to execute QEMU command 'migrate':
    There's a migration process in progress

The problem is that qemu_savevm_state() calls migrate_init() which sets
migration state to MIGRATION_STATUS_SETUP and never cleaned it up.
This patch do the job.

Signed-off-by: Denis V. Lunev <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>
CC: Juan Quintela <address@hidden>
CC: Amit Shah <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Amit Shah <address@hidden>


  Commit: 73a8912b8aeed1c992e3f9cb4880e9d1edb935de
      
https://github.com/qemu/qemu/commit/73a8912b8aeed1c992e3f9cb4880e9d1edb935de
  Author: Liang Li <address@hidden>
  Date:   2016-06-17 (Fri, 17 Jun 2016)

  Changed paths:
    M migration/ram.c

  Log Message:
  -----------
  migration: Fix multi-thread compression bug

Recently, a bug related to multiple thread compression feature for
live migration is reported. The destination side will be blocked
during live migration if there are heavy workload in host and
memory intensive workload in guest, this is most likely to happen
when there is one decompression thread.

Some parts of the decompression code are incorrect:
1. The main thread receives data from source side will enter a busy
loop to wait for a free decompression thread.
2. A lock is needed to protect the decomp_param[idx]->start, because
it is checked in the main thread and is updated in the decompression
thread.

Fix these two issues by following the code pattern for compression.

Signed-off-by: Liang Li <address@hidden>
Reported-by: Daniel P. Berrange <address@hidden>
Reviewed-by: Daniel P. Berrange <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Tested-by: Daniel P. Berrange <address@hidden>

Signed-off-by: Liang Li <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Amit Shah <address@hidden>


  Commit: 5533b2e9bcd222e37ca6c2ff06e79adf9bf036bf
      
https://github.com/qemu/qemu/commit/5533b2e9bcd222e37ca6c2ff06e79adf9bf036bf
  Author: Liang Li <address@hidden>
  Date:   2016-06-17 (Fri, 17 Jun 2016)

  Changed paths:
    M migration/ram.c

  Log Message:
  -----------
  migration: Fix a potential issue

At the end of live migration and before vm_start() on the destination
side, we should make sure all the decompression tasks are finished, if
this can not be guaranteed, the VM may get the incorrect memory data,
or the updated memory may be overwritten by the decompression thread.
Add the code to fix this potential issue.

Suggested-by: David Alan Gilbert <address@hidden>
Suggested-by: Juan Quintela <address@hidden>
Signed-off-by: Liang Li <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Amit Shah <address@hidden>


  Commit: e7bb92e21a47c97dc477dc0dd49acf8ee0e633ad
      
https://github.com/qemu/qemu/commit/e7bb92e21a47c97dc477dc0dd49acf8ee0e633ad
  Author: Liang Li <address@hidden>
  Date:   2016-06-17 (Fri, 17 Jun 2016)

  Changed paths:
    M migration/ram.c

  Log Message:
  -----------
  migration: remove useless code

page_buffer is set twice repeatedly, remove the previous set.

Signed-off-by: Liang Li <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Amit Shah <address@hidden>


  Commit: b3be28969b797b27d7f7f806827e9898e4ee08f0
      
https://github.com/qemu/qemu/commit/b3be28969b797b27d7f7f806827e9898e4ee08f0
  Author: Liang Li <address@hidden>
  Date:   2016-06-17 (Fri, 17 Jun 2016)

  Changed paths:
    M migration/qemu-file.c
    M migration/ram.c

  Log Message:
  -----------
  qemu-file: Fix qemu_put_compression_data flaw

Current qemu_put_compression_data can only work with no writable
QEMUFile, and can't work with the writable QEMUFile. But it does
not provide any measure to prevent users from using it with a
writable QEMUFile.

We should fix this flaw to make it works with writable QEMUFile.

Signed-off-by: Liang Li <address@hidden>
Suggested-by: Juan Quintela <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Amit Shah <address@hidden>


  Commit: fc50438ed0b7106542048d70686ee4b1c340ea49
      
https://github.com/qemu/qemu/commit/fc50438ed0b7106542048d70686ee4b1c340ea49
  Author: Liang Li <address@hidden>
  Date:   2016-06-17 (Fri, 17 Jun 2016)

  Changed paths:
    M migration/ram.c

  Log Message:
  -----------
  migration: refine ram_save_compressed_page

Use qemu_put_compression_data to do the compression directly
instead of using do_compress_ram_page, avoid some data copy.
very small improvement, at the same time, add code to check
if the compression is successful.

Signed-off-by: Liang Li <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Amit Shah <address@hidden>


  Commit: 90e56fb46d0a7add88ed463efa4e723a6238f692
      
https://github.com/qemu/qemu/commit/90e56fb46d0a7add88ed463efa4e723a6238f692
  Author: Liang Li <address@hidden>
  Date:   2016-06-17 (Fri, 17 Jun 2016)

  Changed paths:
    M migration/ram.c

  Log Message:
  -----------
  migration: protect the quit flag by lock

quit_comp_thread and quit_decomp_thread are accessed by several
thread, it's better to protect them with locks. We use a per
thread flag to replace the global one, and the new flag is protected
by a lock.

Signed-off-by: Liang Li <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Amit Shah <address@hidden>


  Commit: a7a9a88f9d29da125b0958f3bd1b15182dc94f5f
      
https://github.com/qemu/qemu/commit/a7a9a88f9d29da125b0958f3bd1b15182dc94f5f
  Author: Liang Li <address@hidden>
  Date:   2016-06-17 (Fri, 17 Jun 2016)

  Changed paths:
    M migration/ram.c

  Log Message:
  -----------
  migration: refine the compression code

The current code for multi-thread compression is not clear,
especially in the aspect of using lock. Refine the code
to make it clear.

Signed-off-by: Liang Li <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Amit Shah <address@hidden>


  Commit: 33d151f4188a40faee224aba1c7b9ad7b1568eb4
      
https://github.com/qemu/qemu/commit/33d151f4188a40faee224aba1c7b9ad7b1568eb4
  Author: Liang Li <address@hidden>
  Date:   2016-06-17 (Fri, 17 Jun 2016)

  Changed paths:
    M migration/ram.c

  Log Message:
  -----------
  migration: refine the decompression code

The current code for multi-thread decompression is not clear,
especially in the aspect of using lock. Refine the code
to make it clear.

Signed-off-by: Liang Li <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Amit Shah <address@hidden>


  Commit: 0d9f9a5c5237c7c9241b38769a2d06959c943f8b
      
https://github.com/qemu/qemu/commit/0d9f9a5c5237c7c9241b38769a2d06959c943f8b
  Author: Liang Li <address@hidden>
  Date:   2016-06-17 (Fri, 17 Jun 2016)

  Changed paths:
    M migration/ram.c

  Log Message:
  -----------
  migration: code clean up

Use 'QemuMutex comp_done_lock' and 'QemuCond comp_done_cond' instead
of 'QemuMutex *comp_done_lock' and 'QemuCond comp_done_cond'. To keep
consistent with 'QemuMutex decomp_done_lock' and
'QemuCond comp_done_cond'.

Signed-off-by: Liang Li <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Amit Shah <address@hidden>


  Commit: 0794d8895ef8d1bd6db528e5d9ca19b86297803b
      
https://github.com/qemu/qemu/commit/0794d8895ef8d1bd6db528e5d9ca19b86297803b
  Author: Amit Shah <address@hidden>
  Date:   2016-06-17 (Fri, 17 Jun 2016)

  Changed paths:
    M scripts/vmstate-static-checker.py

  Log Message:
  -----------
  vmstate-static-checker: fix size mismatch detection in unused fields

If a field changed from something to unused, the checker wasn't flagging
if the field size mismatched.  This was noticed in:

http://thread.gmane.org/gmane.comp.emulators.qemu/419802

where the 4->1 size change along with field name change to 'unused'
wasn't being flagged.  Fix this.

Signed-off-by: Amit Shah <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Amit Shah <address@hidden>


  Commit: 98b5b7422fe1813040b499a4be415a9f514f1c10
      
https://github.com/qemu/qemu/commit/98b5b7422fe1813040b499a4be415a9f514f1c10
  Author: Peter Maydell <address@hidden>
  Date:   2016-06-17 (Fri, 17 Jun 2016)

  Changed paths:
    M migration/migration.c
    M migration/qemu-file.c
    M migration/ram.c
    M migration/savevm.c
    M migration/vmstate.c
    M scripts/vmstate-static-checker.py
    M trace-events

  Log Message:
  -----------
  Merge remote-tracking branch 
'remotes/amit-migration/tags/migration-for-2.7-5' into staging

Migration:

 - many compression/decompression fixes
 - trace improvements
 - static checker fix for detecting size mismatch in unused fields
 - fix VM save after snapshot

# gpg: Signature made Fri 17 Jun 2016 13:59:44 BST
# gpg:                using RSA key 0xEB0B4DFC657EF670
# gpg: Good signature from "Amit Shah <address@hidden>"
# gpg:                 aka "Amit Shah <address@hidden>"
# gpg:                 aka "Amit Shah <address@hidden>"
# Primary key fingerprint: 48CA 3722 5FE7 F4A8 B337  2735 1E9A 3B5F 8540 83B6
#      Subkey fingerprint: CC63 D332 AB8F 4617 4529  6534 EB0B 4DFC 657E F670

* remotes/amit-migration/tags/migration-for-2.7-5:
  vmstate-static-checker: fix size mismatch detection in unused fields
  migration: code clean up
  migration: refine the decompression code
  migration: refine the compression code
  migration: protect the quit flag by lock
  migration: refine ram_save_compressed_page
  qemu-file: Fix qemu_put_compression_data flaw
  migration: remove useless code
  migration: Fix a potential issue
  migration: Fix multi-thread compression bug
  migration: fix inability to save VM after snapshot
  migration: Trace improvements
  migration: Don't use *_to_cpup() and cpu_to_*w()

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/4acc8fdfd315...98b5b7422fe1

reply via email to

[Prev in Thread] Current Thread [Next in Thread]