qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 914905: migration: fix vmdesc leak on vmstate


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] 914905: migration: fix vmdesc leak on vmstate_save() error
Date: Thu, 26 Sep 2019 08:13:36 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 91490583f3cc8613159008502decf2f1481508fd
      
https://github.com/qemu/qemu/commit/91490583f3cc8613159008502decf2f1481508fd
  Author: Marc-André Lureau <address@hidden>
  Date:   2019-09-25 (Wed, 25 Sep 2019)

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

  Log Message:
  -----------
  migration: fix vmdesc leak on vmstate_save() error

Signed-off-by: Marc-André Lureau <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>
Reviewed-by: Daniel P. Berrangé <address@hidden>
Signed-off-by: Dr. David Alan Gilbert <address@hidden>


  Commit: 8324ef86f004b1224844267d1fbbf4a80a54207d
      
https://github.com/qemu/qemu/commit/8324ef86f004b1224844267d1fbbf4a80a54207d
  Author: Wei Yang <address@hidden>
  Date:   2019-09-25 (Wed, 25 Sep 2019)

  Changed paths:
    M migration/ram.c

  Log Message:
  -----------
  migration/postcopy: not necessary to do discard when canonicalizing bitmap

All pages, either partially sent or partially dirty, will be discarded in
postcopy_send_discard_bm_ram(), since we update the unsentmap to be
unsentmap = unsentmap | dirty in ram_postcopy_send_discard_bitmap().

This is not necessary to do discard when canonicalizing bitmap. And by
doing so, we separate the page discard into two individual steps:

  * canonicalize bitmap
  * discard page

Signed-off-by: Wei Yang <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>
Signed-off-by: Dr. David Alan Gilbert <address@hidden>


  Commit: 1e7cf8c323f65c3eab99b2c7a7488dd71884ea10
      
https://github.com/qemu/qemu/commit/1e7cf8c323f65c3eab99b2c7a7488dd71884ea10
  Author: Wei Yang <address@hidden>
  Date:   2019-09-25 (Wed, 25 Sep 2019)

  Changed paths:
    M include/exec/ram_addr.h
    M migration/ram.c

  Log Message:
  -----------
  migration/postcopy: unsentmap is not necessary for postcopy

Commit f3f491fcd6dd594ba695 ('Postcopy: Maintain unsentmap') introduced
unsentmap to track not yet sent pages.

This is not necessary since:

    * unsentmap is a sub-set of bmap before postcopy start
    * unsentmap is the summation of bmap and unsentmap after canonicalizing

This patch just removes it.

Signed-off-by: Wei Yang <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>
Signed-off-by: Dr. David Alan Gilbert <address@hidden>


  Commit: 64737606e8e54db28ac9dbfc10e175d267d2c8fb
      
https://github.com/qemu/qemu/commit/64737606e8e54db28ac9dbfc10e175d267d2c8fb
  Author: Wei Yang <address@hidden>
  Date:   2019-09-25 (Wed, 25 Sep 2019)

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

  Log Message:
  -----------
  migration: remove sent parameter in get_queued_page_not_dirty

This is a cleanup for previous removal of unsentmap.

The sent parameter is not necessary now.

Signed-off-by: Wei Yang <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>
Signed-off-by: Dr. David Alan Gilbert <address@hidden>


  Commit: de8434a35a7871f5f09ff1b22af2dad40a7a0fba
      
https://github.com/qemu/qemu/commit/de8434a35a7871f5f09ff1b22af2dad40a7a0fba
  Author: Dr. David Alan Gilbert <address@hidden>
  Date:   2019-09-25 (Wed, 25 Sep 2019)

  Changed paths:
    M migration/rdma.c

  Log Message:
  -----------
  migration/rdma: Don't moan about disconnects at the end

If we've already finished the migration or something has
already gone wrong, don't moan about the migration stream disconnecting.

Signed-off-by: Dr. David Alan Gilbert <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Peter Xu <address@hidden>
Signed-off-by: Dr. David Alan Gilbert <address@hidden>


  Commit: d46a4847ca868aaf537df2b87ce07dcbcad6a224
      
https://github.com/qemu/qemu/commit/d46a4847ca868aaf537df2b87ce07dcbcad6a224
  Author: Dr. David Alan Gilbert <address@hidden>
  Date:   2019-09-25 (Wed, 25 Sep 2019)

  Changed paths:
    M migration/rdma.c

  Log Message:
  -----------
  migration/rdma.c: Swap synchronize_rcu for call_rcu

This fixes a deadlock that can occur on the migration source after
a failed RDMA migration;  as the source tries to cleanup it
clears a pair of pointers and uses synchronize_rcu to wait; this
is happening on the main thread.  With the CPUs running
a CPU thread can be an rcu reader and attempt to grab the main lock
(kvm_handle_io->address_space_write->flatview_write->flatview_write_continue->
prepare_mmio_access->qemu_mutex_lock_iothread_impl)

Replace the synchronize_rcu with a call_rcu to postpone the freeing.

Fixes: 74637e6f08fceda98806 ("migration: implement bi-directional RDMA 
QIOChannel")

( https://bugzilla.redhat.com/show_bug.cgi?id=1746787 )

Signed-off-by: Dr. David Alan Gilbert <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Peter Xu <address@hidden>
Signed-off-by: Dr. David Alan Gilbert <address@hidden>


  Commit: e15310ea0732ea46d9ef66d6ca5def02c7dfa531
      
https://github.com/qemu/qemu/commit/e15310ea0732ea46d9ef66d6ca5def02c7dfa531
  Author: Dr. David Alan Gilbert <address@hidden>
  Date:   2019-09-25 (Wed, 25 Sep 2019)

  Changed paths:
    M tests/migration-test.c

  Log Message:
  -----------
  tests/migration: Fail on unexpected migration states

We've got various places where we wait for a migration to enter
a given state; but if we enter an unexpected state we tend to fail
in odd ways; add a mechanism for explicitly testing for any state
which we shouldn't be in.

Signed-off-by: Dr. David Alan Gilbert <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Cleber Rosa <address@hidden>
Tested-by: Cleber Rosa <address@hidden>
Reviewed-by: Alex Bennée <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Reviewed-by: Peter Xu <address@hidden>
Signed-off-by: Dr. David Alan Gilbert <address@hidden>


  Commit: 513aa2c6faf1cd9ea407264d73173e43cc9fde82
      
https://github.com/qemu/qemu/commit/513aa2c6faf1cd9ea407264d73173e43cc9fde82
  Author: Dr. David Alan Gilbert <address@hidden>
  Date:   2019-09-25 (Wed, 25 Sep 2019)

  Changed paths:
    M tests/migration-test.c

  Log Message:
  -----------
  tests/migration/postcopy: trim migration bandwidth

On slow hosts with tcg we were sometimes finding that the migration
would complete during precopy and never get into the postcopy test.
Trim back the bandwidth a bit to make that much less likely.

Signed-off-by: Dr. David Alan Gilbert <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Cleber Rosa <address@hidden>
Acked-by: Alex Bennée <address@hidden>
Tested-by: Cleber Rosa <address@hidden>
Tested-by: Alex Bennée <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Reviewed-by: Peter Xu <address@hidden>
Signed-off-by: Dr. David Alan Gilbert <address@hidden>


  Commit: 3748fef9b95a9bc1602f3c4ed2a329d8ef47e63c
      
https://github.com/qemu/qemu/commit/3748fef9b95a9bc1602f3c4ed2a329d8ef47e63c
  Author: Dr. David Alan Gilbert <address@hidden>
  Date:   2019-09-25 (Wed, 25 Sep 2019)

  Changed paths:
    M migration/migration.c

  Log Message:
  -----------
  migration/postcopy: Recognise the recovery states as 'in_postcopy'

Various parts of the migration code do different things when they're
in postcopy mode; prior to this patch this has been 'postcopy-active'.
This patch extends 'in_postcopy' to include 'postcopy-paused' and
'postcopy-recover'.

In particular, when you set the max-postcopy-bandwidth parameter, this
only affects the current migration fd if we're 'in_postcopy';
this leads to a race in the postcopy recovery test where it increases
the speed from 4k/sec to unlimited, but that increase can get ignored
if the change is made between the point at which the reconnection
happens and it transitions back to active.

Signed-off-by: Dr. David Alan Gilbert <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Alex Bennée <address@hidden>
Reviewed-by: Peter Xu <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Tested-by: Alex Bennée <address@hidden>
Tested-by: Markus Armbruster <address@hidden>
Signed-off-by: Dr. David Alan Gilbert <address@hidden>


  Commit: eb13d1cf4a0478fc29f80abfbac8209479325f35
      
https://github.com/qemu/qemu/commit/eb13d1cf4a0478fc29f80abfbac8209479325f35
  Author: Peter Maydell <address@hidden>
  Date:   2019-09-26 (Thu, 26 Sep 2019)

  Changed paths:
    M include/exec/ram_addr.h
    M migration/migration.c
    M migration/qjson.h
    M migration/ram.c
    M migration/rdma.c
    M migration/savevm.c
    M migration/trace-events
    M tests/migration-test.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/dgilbert/tags/pull-migration-20190925a' 
into staging

Migration pull 2019-09-25

  me: test fixes from (should stop hangs in postcopy tests).
  me: An RDMA cleanup hang fix
  Wei: Tidy ups around postcopy
  Marc-Andre: mem leak fix

# gpg: Signature made Wed 25 Sep 2019 15:59:41 BST
# gpg:                using RSA key 45F5C71B4A0CB7FB977A9FA90516331EBC5BFDE7
# gpg: Good signature from "Dr. David Alan Gilbert (RH2) <address@hidden>" 
[full]
# Primary key fingerprint: 45F5 C71B 4A0C B7FB 977A  9FA9 0516 331E BC5B FDE7

* remotes/dgilbert/tags/pull-migration-20190925a:
  migration/postcopy: Recognise the recovery states as 'in_postcopy'
  tests/migration/postcopy: trim migration bandwidth
  tests/migration: Fail on unexpected migration states
  migration/rdma.c: Swap synchronize_rcu for call_rcu
  migration/rdma: Don't moan about disconnects at the end
  migration: remove sent parameter in get_queued_page_not_dirty
  migration/postcopy: unsentmap is not necessary for postcopy
  migration/postcopy: not necessary to do discard when canonicalizing bitmap
  migration: fix vmdesc leak on vmstate_save() error

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


Compare: https://github.com/qemu/qemu/compare/d4e536f336d3...eb13d1cf4a04



reply via email to

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