qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/6] multifd: a new mechanism for send thread sync
@ 2019-06-06  8:34 Wei Yang
  2019-06-06  8:34 ` [Qemu-devel] [PATCH 1/6] migration/multifd: move MultiFDSendParams handling into multifd_send_fill_packet() Wei Yang
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Wei Yang @ 2019-06-06  8:34 UTC (permalink / raw)
  To: qemu-devel; +Cc: Wei Yang, dgilbert, quintela

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

The reason is:

  * if MULTIFD_FLAG_SYNC is set in the middle of send thread running, there
    is one more spurious wakeup
  * if MULTIFD_FLAG_SYNC is set when send thread is not running, there is one
    more channels_ready be triggered 

To solve this situation, one new mechanism is introduced to synchronize send
threads. The idea is simple, a new field *sync* is introduced to indicate a
synchronization is required.

Wei Yang (6):
  migration/multifd: move MultiFDSendParams handling 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 not be 0 for a pending job
  migration/multifd: use boolean for pending_job is enough
  migration/multifd: there is no spurious wakeup now

 migration/ram.c | 62 +++++++++++++++++++++++++++++++------------------
 1 file changed, 39 insertions(+), 23 deletions(-)

-- 
2.19.1



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-06-06  8:52 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-06  8:34 [Qemu-devel] [PATCH 0/6] multifd: a new mechanism for send thread sync Wei Yang
2019-06-06  8:34 ` [Qemu-devel] [PATCH 1/6] migration/multifd: move MultiFDSendParams handling into multifd_send_fill_packet() Wei Yang
2019-06-06  8:34 ` [Qemu-devel] [PATCH 2/6] migration/multifd: notify channels_ready when send thread starts Wei Yang
2019-06-06  8:34 ` [Qemu-devel] [PATCH 3/6] migration/multifd: use sync field to synchronize send threads Wei Yang
2019-06-06  8:34 ` [Qemu-devel] [PATCH 4/6] migration/multifd: used must not be 0 for a pending job Wei Yang
2019-06-06  8:35 ` [Qemu-devel] [PATCH 5/6] migration/multifd: use boolean for pending_job is enough Wei Yang
2019-06-06  8:35 ` [Qemu-devel] [PATCH 6/6] migration/multifd: there is no spurious wakeup now Wei Yang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).