migration: hold the lock only if it is really needed
commitae526e32bd36cfb84045c8d2fd34e0b9e39a52f8
authorXiao Guangrong <xiaoguangrong@tencent.com>
Tue, 21 Aug 2018 08:10:25 +0000 (21 16:10 +0800)
committerJuan Quintela <quintela@redhat.com>
Wed, 22 Aug 2018 10:36:18 +0000 (22 12:36 +0200)
treebd6083598307d47aec30506bfe26b7ec0fe4ece5
parent5e5fdcff28ebbba2004c6498218f506f364f1e8a
migration: hold the lock only if it is really needed

Try to hold src_page_req_mutex only if the queue is not
empty

Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Xiao Guangrong <xiaoguangrong@tencent.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
include/qemu/queue.h
migration/ram.c