From: Kevin Wolf <kwolf@redhat.com>
To: "Chunqiang (CQ) Tang" <tangchq@gmail.com>
Cc: Stefan Hajnoczi <stefanha@gmail.com>,
qemu-devel@nongnu.org, Avi Kivity <avi@redhat.com>
Subject: Re: [Qemu-devel] thread synchronization in qcow2.c and qcow2-cluster.c
Date: Wed, 28 Apr 2010 11:08:02 +0200 [thread overview]
Message-ID: <4BD7FAF2.1000900@redhat.com> (raw)
In-Reply-To: <k2v50c1b8771004271339zf55a7abej8251f18169e5d3a2@mail.gmail.com>
Am 27.04.2010 22:39, schrieb Chunqiang (CQ) Tang:
>> kvm-all.c:kvm_cpu_exec:
>> qemu_mutex_unlock_iothread();
>> ret = kvm_vcpu_ioctl(env, KVM_RUN, 0);
>> qemu_mutex_lock_iothread();
>
> Thank you for the information. I also suspected that
> qemu_mutex_lock_iothread() does the synchronization. However, my
> profiling showed that qemu-kvm.c:kvm_cpu_exec() in is actually
> executed, instead of kvm-all.c:kvm_cpu_exec(). Also I previously
> profiled all executions of qemu_mutex_lock_iothread(), and found that
> it only protects the vl.c:main_loop_wai() thread but does NOT protect
> the qemu-kvm.c:kvm_cpu_exec() thread. Did I miss something or is this
> a defect? I did extensive profiling but still don't know the source
> code well enough to confidently draw a conclusion.
That code path exists only in qemu-kvm, but yes, looks wrong to me. The
block drivers are definitely not prepared to run in parallel in multiple
threads.
Avi, something missing there in qemu-kvm?
Kevin
prev parent reply other threads:[~2010-04-28 9:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-27 16:06 [Qemu-devel] thread synchronization in qcow2.c and qcow2-cluster.c Chunqiang (CQ) Tang
2010-04-27 19:49 ` Stefan Hajnoczi
2010-04-27 20:39 ` Chunqiang (CQ) Tang
2010-04-27 21:26 ` Stefan Hajnoczi
2010-04-28 8:13 ` Stefan Hajnoczi
2010-04-28 14:59 ` Chunqiang (CQ) Tang
2010-04-28 9:08 ` Kevin Wolf [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4BD7FAF2.1000900@redhat.com \
--to=kwolf@redhat.com \
--cc=avi@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.com \
--cc=tangchq@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.