qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 2f4aef: migration: multifd_send_thread always


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] 2f4aef: migration: multifd_send_thread always post p->sem_...
Date: Fri, 13 Sep 2019 07:43:56 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 2f4aefd320a8c3aeb739d59724c5c4dd6a995919
      
https://github.com/qemu/qemu/commit/2f4aefd320a8c3aeb739d59724c5c4dd6a995919
  Author: Ivan Ren <address@hidden>
  Date:   2019-09-12 (Thu, 12 Sep 2019)

  Changed paths:
    M migration/ram.c

  Log Message:
  -----------
  migration: multifd_send_thread always post p->sem_sync when error happen

When encounter error, multifd_send_thread should always notify who pay
attention to it before exit. Otherwise it may block migration_thread
at multifd_send_sync_main forever.

Error as follow:
-------------------------------------------------------------------------------
 (gdb) bt
 #0  0x00007f4d669dfa0b in do_futex_wait.constprop.1 () from 
/lib64/libpthread.so.0
 #1  0x00007f4d669dfa9f in __new_sem_wait_slow.constprop.0 () from 
/lib64/libpthread.so.0
 #2  0x00007f4d669dfb3b in sem_wait@@GLIBC_2.2.5 () from /lib64/libpthread.so.0
 #3  0x0000562ccf0a5614 in qemu_sem_wait (sem=sem@entry=0x562cd1b698e8) at 
util/qemu-thread-posix.c:319
 #4  0x0000562ccecb4752 in multifd_send_sync_main (rs=<optimized out>) at 
/qemu/migration/ram.c:1099
 #5  0x0000562ccecb95f4 in ram_save_iterate (f=0x562cd0ecc000, 
opaque=<optimized out>) at /qemu/migration/ram.c:3550
 #6  0x0000562ccef43c23 in qemu_savevm_state_iterate (f=0x562cd0ecc000, 
postcopy=false) at migration/savevm.c:1189
 #7  0x0000562ccef3dcf3 in migration_iteration_run (s=0x562cd09fabf0) at 
migration/migration.c:3131
 #8  migration_thread (opaque=opaque@entry=0x562cd09fabf0) at 
migration/migration.c:3258
 #9  0x0000562ccf0a4c26 in qemu_thread_start (args=<optimized out>) at 
util/qemu-thread-posix.c:502
 #10 0x00007f4d669d9e25 in start_thread () from /lib64/libpthread.so.0
 #11 0x00007f4d6670635d in clone () from /lib64/libc.so.6
 (gdb) f 4
 #4  0x0000562ccecb4752 in multifd_send_sync_main (rs=<optimized out>) at 
/qemu/migration/ram.c:1099
 1099           qemu_sem_wait(&p->sem_sync);
 (gdb) list
 1094       }
 1095       for (i = 0; i < migrate_multifd_channels(); i++) {
 1096           MultiFDSendParams *p = &multifd_send_state->params[i];
 1097
 1098           trace_multifd_send_sync_main_wait(p->id);
 1099           qemu_sem_wait(&p->sem_sync);
 1100       }
 1101       trace_multifd_send_sync_main(multifd_send_state->packet_num);
 1102   }
 1103
 (gdb) p i
 $1 = 0
 (gdb)  p multifd_send_state->params[0].pending_job
 $2 = 2    //It means the job before MULTIFD_FLAG_SYNC has already fail
 (gdb)  p multifd_send_state->params[0].quit
 $3 = true

Signed-off-by: Ivan Ren <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Signed-off-by: Dr. David Alan Gilbert <address@hidden>


  Commit: cea3b4c083d26d3114cd2881af46efb52cff6c81
      
https://github.com/qemu/qemu/commit/cea3b4c083d26d3114cd2881af46efb52cff6c81
  Author: Wei Yang <address@hidden>
  Date:   2019-09-12 (Thu, 12 Sep 2019)

  Changed paths:
    M migration/savevm.c

  Log Message:
  -----------
  migration: cleanup check on ops in savevm.handlers iterations

During migration, there are several places to iterate on
savevm.handlers. And on each iteration, we need to check its ops and
related callbacks before invoke it.

Generally, ops is the first element to check, and it is only necessary
to check it once.

This patch clean all the related part in savevm.c to check ops only once
in those iterations.

Signed-off-by: Wei Yang <address@hidden>

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


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

  Changed paths:
    M hw/net/vmxnet3.c

  Log Message:
  -----------
  hw/net/vmxnet3: Fix leftover unregister_savevm

Commit 78dd48df3 reworked vmxnet3's live migration but left a straggling
unregister_savevm call.  Remove it, although it doesn't seem to have
any bad effect.

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


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

  Changed paths:
    M docs/devel/migration.rst
    M hw/ppc/spapr.c
    M hw/s390x/s390-skeys.c
    M hw/s390x/s390-stattrib.c
    M hw/s390x/tod.c
    M include/migration/register.h
    M migration/block-dirty-bitmap.c
    M migration/block.c
    M migration/ram.c
    M migration/savevm.c
    M net/slirp.c

  Log Message:
  -----------
  migration: register_savevm_live doesn't need dev

Commit 78dd48df3 removed the last caller of register_savevm_live for an
instantiable device (rather than a single system wide device);
so trim out the parameter.

Signed-off-by: Dr. David Alan Gilbert <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Cornelia Huck <address@hidden>
Signed-off-by: Dr. David Alan Gilbert <address@hidden>


  Commit: 3b348706729c2154aae78f593b682d960bfb5930
      
https://github.com/qemu/qemu/commit/3b348706729c2154aae78f593b682d960bfb5930
  Author: Dr. David Alan Gilbert <address@hidden>
  Date:   2019-09-12 (Thu, 12 Sep 2019)

  Changed paths:
    M migration/qemu-file.c

  Log Message:
  -----------
  qemu-file: Rework old qemu_fflush comment

Commit 11808bb removed the non-iovec based write support,
the comment hung on.

Signed-off-by: Dr. David Alan Gilbert <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Daniel P. Berrangé <address@hidden>
Reviewed-by: Stefano Garzarella <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Signed-off-by: Dr. David Alan Gilbert <address@hidden>


  Commit: b9d68df62a1340529f7eef251353d2040c66f403
      
https://github.com/qemu/qemu/commit/b9d68df62a1340529f7eef251353d2040c66f403
  Author: Yury Kotov <address@hidden>
  Date:   2019-09-12 (Thu, 12 Sep 2019)

  Changed paths:
    M migration/migration.c
    M migration/migration.h
    M migration/savevm.c
    M qapi/migration.json

  Log Message:
  -----------
  migration: Add validate-uuid capability

This capability realizes simple source validation by UUID.
It's useful for live migration between hosts.

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


  Commit: d43e59e7ab883249c25cca513837407461216900
      
https://github.com/qemu/qemu/commit/d43e59e7ab883249c25cca513837407461216900
  Author: Yury Kotov <address@hidden>
  Date:   2019-09-12 (Thu, 12 Sep 2019)

  Changed paths:
    M tests/libqtest.c
    M tests/libqtest.h

  Log Message:
  -----------
  tests/libqtest: Allow setting expected exit status

Add qtest_set_expected_status function to set expected exit status of
child process. By default expected exit status is 0.

Signed-off-by: Yury Kotov <address@hidden>
Message-Id: <address@hidden>
Acked-by: Thomas Huth <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>
Signed-off-by: Dr. David Alan Gilbert <address@hidden>


  Commit: 3af31a3469342a621949b721f3a020b452092bf9
      
https://github.com/qemu/qemu/commit/3af31a3469342a621949b721f3a020b452092bf9
  Author: Yury Kotov <address@hidden>
  Date:   2019-09-12 (Thu, 12 Sep 2019)

  Changed paths:
    M tests/migration-test.c

  Log Message:
  -----------
  tests/migration: Add a test for validate-uuid capability

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


  Commit: 8504ddeca0d1f592877dba8dc0db44b4d7fd8c52
      
https://github.com/qemu/qemu/commit/8504ddeca0d1f592877dba8dc0db44b4d7fd8c52
  Author: Peter Xu <address@hidden>
  Date:   2019-09-12 (Thu, 12 Sep 2019)

  Changed paths:
    M migration/migration.c

  Log Message:
  -----------
  migration: Fix postcopy bw for recovery

We've got max-postcopy-bandwidth parameter but it's not applied
correctly after a postcopy recovery so the recovered migration stream
will still eat the whole net bandwidth.  Fix that up.

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


  Commit: 89fe04b4585c97fda7c173bee97bbacb32f64e80
      
https://github.com/qemu/qemu/commit/89fe04b4585c97fda7c173bee97bbacb32f64e80
  Author: Wei Yang <address@hidden>
  Date:   2019-09-12 (Thu, 12 Sep 2019)

  Changed paths:
    M migration/qemu-file.c

  Log Message:
  -----------
  migration/qemu-file: remove check on writev_buffer in 
qemu_put_compression_data

The check of writev_buffer is in qemu_fflush, which means it is not
harmful if it is NULL.

And removing it will make the code consistent since all other
add_to_iovec() is called without the check.

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


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

  Changed paths:
    M migration/qemu-file.c

  Log Message:
  -----------
  migration/qemu-file: fix potential buf waste for extra buf_index adjustment

In add_to_iovec(), qemu_fflush() will be called if iovec is full. If
this happens, buf_index is reset. Currently, this is not checked and
buf_index would always been adjust with buf size.

This is not harmful, but will waste some space in file buffer.

This patch make add_to_iovec() return 1 when it has flushed the file.
Then the caller could check the return value to see whether it is
necessary to adjust the buf_index any more.

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

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


  Commit: 268dcd46ae6d608a4ce93b191b51a318504bf1fb
      
https://github.com/qemu/qemu/commit/268dcd46ae6d608a4ce93b191b51a318504bf1fb
  Author: Wei Yang <address@hidden>
  Date:   2019-09-12 (Thu, 12 Sep 2019)

  Changed paths:
    M migration/migration.c

  Log Message:
  -----------
  migration: fix one typo in comment of function migration_total_bytes()

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


  Commit: 85182c96de61f0b600bbe834d5a23e713162e892
      
https://github.com/qemu/qemu/commit/85182c96de61f0b600bbe834d5a23e713162e892
  Author: Peter Maydell <address@hidden>
  Date:   2019-09-13 (Fri, 13 Sep 2019)

  Changed paths:
    M docs/devel/migration.rst
    M hw/net/vmxnet3.c
    M hw/ppc/spapr.c
    M hw/s390x/s390-skeys.c
    M hw/s390x/s390-stattrib.c
    M hw/s390x/tod.c
    M include/migration/register.h
    M migration/block-dirty-bitmap.c
    M migration/block.c
    M migration/migration.c
    M migration/migration.h
    M migration/qemu-file.c
    M migration/ram.c
    M migration/savevm.c
    M net/slirp.c
    M qapi/migration.json
    M tests/libqtest.c
    M tests/libqtest.h
    M tests/migration-test.c

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

Migration pull 2019-09-12

New feature:
  UUID validation check from Yury Kotov

plus a bunch of fixes.

# gpg: Signature made Thu 12 Sep 2019 14:48:28 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-20190912a:
  migration: fix one typo in comment of function migration_total_bytes()
  migration/qemu-file: fix potential buf waste for extra buf_index adjustment
  migration/qemu-file: remove check on writev_buffer in 
qemu_put_compression_data
  migration: Fix postcopy bw for recovery
  tests/migration: Add a test for validate-uuid capability
  tests/libqtest: Allow setting expected exit status
  migration: Add validate-uuid capability
  qemu-file: Rework old qemu_fflush comment
  migration: register_savevm_live doesn't need dev
  hw/net/vmxnet3: Fix leftover unregister_savevm
  migration: cleanup check on ops in savevm.handlers iterations
  migration: multifd_send_thread always post p->sem_sync when error happen

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


Compare: https://github.com/qemu/qemu/compare/3d9442ee1d78...85182c96de61



reply via email to

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